From: Art Cancro Date: Wed, 28 Jul 2010 03:06:12 +0000 (+0000) Subject: * When outputting legacy Citadel format messages, stop only when we reach a 0x00... X-Git-Tag: v7.86~74 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;ds=sidebyside;h=16e21d839edd0a9f74268cc6ccbc93cd64ac329d;p=citadel.git * When outputting legacy Citadel format messages, stop only when we reach a 0x00 byte, not when we reach any weird character. --- diff --git a/citadel/msgbase.c b/citadel/msgbase.c index fc81c03bd..17d8f3eea 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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);