From 24fa45b9ad087b32c253c76db9e55ec8db49815f Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Wed, 2 Nov 2011 07:30:38 +0000
Subject: [PATCH] When appending .sig files to message body text, expand
 Unix-style (LF) EOL sequences to SMB-style (CRLF). This resolves the issue of
 .sig files created or edited with a Unix-style text editor and the resulting
 signature losing line endings when being exported to FTN (for example).

---
 src/sbbs3/writemsg.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp
index 256d11246c..41759bc256 100644
--- a/src/sbbs3/writemsg.cpp
+++ b/src/sbbs3/writemsg.cpp
@@ -549,8 +549,7 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *title, long mode
 			while(!feof(sig)) {
 				if(!fgets(str,sizeof(str),sig))
 					break;
-				fputs(str,stream);
-				l+=strlen(str);	/* byte counter */
+				l+=fprintf(stream,"%s\r\n",str);
 				lines++;		/* line counter */
 			}
 			fclose(sig);
-- 
GitLab