* two tiny errors weren't seen.
authorWilfried Göesgens <willi@citadel.org>
Thu, 9 Aug 2007 22:30:34 +0000 (22:30 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 9 Aug 2007 22:30:34 +0000 (22:30 +0000)
citadel/citserver.c
citadel/file_ops.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]))) {
index 1ef2b979cfdcb00c39a2c25871fc118e1de8ae94..d32e9f829064cb881e7d713bf24c2f974222fb27 100644 (file)
@@ -433,7 +433,7 @@ void cmd_oimg(char *cmdbuf)
        } else if (!strcasecmp(filename, "_roompic_")) {
                assoc_file_name(pathname, sizeof pathname, &CC->room, ctdl_image_dir);
        } else {
-               for (a = 0; !IsEmptyStr(&filename[0]); ++a) {
+               for (a = 0; !IsEmptyStr(&filename[a]); ++a) {
                        filename[a] = tolower(filename[a]);
                        if (filename[a] == '/') {
                                filename[a] = '_';