* When outputting legacy Citadel format messages, stop only when we reach a 0x00...
authorArt Cancro <ajc@citadel.org>
Wed, 28 Jul 2010 03:06:12 +0000 (03:06 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 28 Jul 2010 03:06:12 +0000 (03:06 +0000)
citadel/msgbase.c

index fc81c03bdac3c7eff96328ed1f1636fc4bd67782..17d8f3eea9f905ecbb5c5073d3fca94d405c056a 100644 (file)
@@ -933,14 +933,14 @@ void memfmout(
        const char *nl          /* string to terminate lines with */
 ) {
        int column = 0;
-       char ch = 0;
+       unsigned char ch = 0;
        char outbuf[1024];
        int len = 0;
        int nllen = 0;
 
        if (!mptr) return;
        nllen = strlen(nl);
-       while (ch=*(mptr++), ch > 0) {
+       while (ch=*(mptr++), ch != 0) {
 
                if (ch == '\n') {
                        client_write(outbuf, len);