Skip to content
Snippets Groups Projects
Commit d63f9ee0 authored by rswindell's avatar rswindell
Browse files

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).
parent ce08cfd9
Branches
Tags
No related merge requests found
......@@ -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 */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment