Fix up ARTV import so that imports actually work.
[citadel.git] / citadel / modules / chat / serv_chat.c
index 9a517f0ceb45c9f2858d705dd578cdc5aadae6f0..afc03dbb4358cd6dd4c33b283e1e1132f884e425 100644 (file)
@@ -724,8 +724,7 @@ void cmd_sexp(char *argbuf)
                        SEND_LISTING, message_sent);
                x_big_msgbuf = malloc(SIZ);
                memset(x_big_msgbuf, 0, SIZ);
-               while (client_getln(x_msg, sizeof x_msg),
-                     strcmp(x_msg, "000")) {
+               while (client_getln(x_msg, sizeof x_msg) >= 0 && strcmp(x_msg, "000")) {
                        x_big_msgbuf = realloc(x_big_msgbuf,
                               strlen(x_big_msgbuf) + strlen(x_msg) + 4);
                        if (!IsEmptyStr(x_big_msgbuf))