From 16e21d839edd0a9f74268cc6ccbc93cd64ac329d Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 28 Jul 2010 03:06:12 +0000 Subject: [PATCH] * When outputting legacy Citadel format messages, stop only when we reach a 0x00 byte, not when we reach any weird character. --- citadel/msgbase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2