diff --git a/src/sbbs3/postmsg.cpp b/src/sbbs3/postmsg.cpp
index 8c2b409c55614812f9c37233eceee9a4a671af71..0903190bd4c1c16e8e42d07f9619ccb10983db97 100644
--- a/src/sbbs3/postmsg.cpp
+++ b/src/sbbs3/postmsg.cpp
@@ -465,9 +465,13 @@ extern "C" int DLLCALL savemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, char* msg
 	}
 	length=strlen(msgbuf);
 
+	/* Remove white-space from end of message text */
+	while(length && (uchar)msgbuf[length-1]<=' ')
+		length--;
+
 	/* Calculate CRC-32 of message text (before encoding, if any) */
 	if(smb->status.max_crcs) {
-		for(l=0;msgbuf[l];l++)
+		for(l=0;l<length;l++)
 			crc=ucrc32(msgbuf[l],crc); 
 		crc=~crc;
 	}