From d63f9ee0c51f9a6c65930ff84bee37693a807a58 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sun, 6 Nov 2011 03:52:55 +0000 Subject: [PATCH] Fix previous commit for Windows (read sig file in text mode, strip trialing white space from lines (include '\r' if there happens to be one). --- src/sbbs3/writemsg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp index f3e96b5bf4..cb575f7ade 100644 --- a/src/sbbs3/writemsg.cpp +++ b/src/sbbs3/writemsg.cpp @@ -546,10 +546,11 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *title, long mode || (subnum!=INVALID_SUB && !(cfg.sub[subnum]->misc&SUB_NOUSERSIG))) { SAFEPRINTF2(str,"%suser/%04u.sig",cfg.data_dir,useron.number); FILE* sig; - if(fexist(str) && (sig=fopen(str,"rb"))!=NULL) { + if(fexist(str) && (sig=fopen(str,"r"))!=NULL) { while(!feof(sig)) { if(!fgets(str,sizeof(str),sig)) break; + truncsp(str); l+=fprintf(stream,"%s\r\n",str); lines++; /* line counter */ } -- GitLab