diff --git a/src/sbbs3/msgtoqwk.cpp b/src/sbbs3/msgtoqwk.cpp
index 4a91ed7c0b26b2e846e22032decca1c9c5418194..1bffa7be9b48a042cf9df7c0bc33fd28040d575a 100644
--- a/src/sbbs3/msgtoqwk.cpp
+++ b/src/sbbs3/msgtoqwk.cpp
@@ -111,13 +111,15 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
 		sprintf(to,"%.128s",msg->to);
 
 	if(msg->from_net.type==NET_QWK && mode&VIA && !msg->forwarded) {
-		sprintf(str,"@VIA: %.*s%c",sizeof(str)-12,(char*)msg->from_net.addr,QWK_NEWLINE);
+		sprintf(str,"@VIA: %.*s%c"
+			,(int)(sizeof(str)-12),(char*)msg->from_net.addr,QWK_NEWLINE);
 		fwrite(str,strlen(str),1,qwk_fp);
 		size+=strlen(str); }
 	
 	if(mode&MSGID && (uint)subnum!=INVALID_SUB) {
 		if(msg->id)
-			sprintf(str,"@MSGID: %.*s%c",sizeof(str)-12,msg->id,QWK_NEWLINE);
+			sprintf(str,"@MSGID: %.*s%c"
+				,(int)(sizeof(str)-12),msg->id,QWK_NEWLINE);
 		else
 			sprintf(str,"@MSGID: <%08lX.%lu.%s@%s>%c"
 				,msg->idx.time,msg->idx.number
@@ -129,7 +131,8 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
 
 		str[0]=0;
 		if(msg->reply_id)
-			sprintf(str,"@REPLY: %.*s%c",sizeof(str)-12,msg->reply_id,QWK_NEWLINE);
+			sprintf(str,"@REPLY: %.*s%c"
+				,(int)(sizeof(str)-12),msg->reply_id,QWK_NEWLINE);
 		else if(msg->hdr.thread_orig) {
 			memset(&orig_msg,0,sizeof(orig_msg));
 			orig_msg.hdr.number=msg->hdr.thread_orig;