[empathy] Make parsing of commend with no args work again



commit 03d787f23201acdd662ad24a42c12695e07c4165
Author: Xavier Claessens <xclaesse gmail com>
Date:   Tue Nov 3 17:31:12 2009 +0100

    Make parsing of commend with no args work again

 libempathy-gtk/empathy-chat.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index e96c02d..dc4ab7f 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -891,9 +891,13 @@ chat_send (EmpathyChat  *chat,
 		for (i = 0; i < G_N_ELEMENTS (commands); i++) {
 			GStrv strv;
 			guint strv_len;
+			gchar c;
 
-			if (!has_prefix_case (msg + 1, commands[i].prefix) ||
-			    !g_ascii_isspace (msg + 1 + strlen (commands[i].prefix))) {
+			if (!has_prefix_case (msg + 1, commands[i].prefix)) {
+				continue;
+			}
+			c = *(msg + 1 + strlen (commands[i].prefix));
+			if (c != '\0' && !g_ascii_isspace (c)) {
 				continue;
 			}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]