* two tiny errors weren't seen.
[citadel.git] / citadel / citserver.c
index 6d19990140b1fe906e4ce696e4b25177ccb41ae2..d74c3a0ab74c3a80003cb8c260b34ff896f2b18e 100644 (file)
@@ -337,7 +337,10 @@ int is_public_client(void)
                        char *ptr;
                        ptr = buf;
                        while (!IsEmptyStr(ptr)) {
-                               if (buf[i] == '#') buf[i] = 0;
+                               if (*ptr == '#') {
+                                       *ptr = 0;
+                                       break;
+                               }
                                else ptr++;
                        }
                        while (isspace((buf[strlen(buf)-1]))) {