]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
[citadel.git] / webcit / mainmenu.c
index 52aa826fc0ada6a668141ead117c31fb79654a53..5022a0c0318a89cddde7ea0333f13da4ae463e6f 100644 (file)
@@ -114,9 +114,10 @@ void do_generic(void)
                }
        case 1:
                while (!Done) {
-                       StrBuf_ServGetln(Buf);
-                       if ( (StrLength(Buf)==3) && 
-                            !strcmp(ChrPtr(Buf), "000")) {
+                       if (StrBuf_ServGetln(LineBuf) < 0)
+                               break;
+                       if ( (StrLength(LineBuf)==3) && 
+                            !strcmp(ChrPtr(LineBuf), "000")) {
                                Done = 1;
                        }
                        StrEscAppend(WCC->WBuf, Buf, NULL, 0, 0);