From b4ffc3a617579b869d89aa1839e9c6a0f1ee9c74 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 27 Oct 2018 22:51:14 +1000 Subject: [PATCH] Fixes for qwkscan --- utils/qwknet/qwkscan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/qwknet/qwkscan.c b/utils/qwknet/qwkscan.c index d04d800..bc3be07 100644 --- a/utils/qwknet/qwkscan.c +++ b/utils/qwknet/qwkscan.c @@ -183,7 +183,7 @@ int export_messages(int baseno, char *basefilename, int qwkidx) { } else { len = jsp->Fields[z]->DatLen; } - memset(qh.MsgSubj, 0, 25); + memset(qh.MsgSubj, ' ', 25); memcpy(qh.MsgSubj, jsp->Fields[z]->Buffer, len); } if (jsp->Fields[z]->LoID == JAMSFLD_SENDERNAME) { @@ -192,7 +192,7 @@ int export_messages(int baseno, char *basefilename, int qwkidx) { } else { len = jsp->Fields[z]->DatLen; } - memset(qh.MsgFrom, 0, 25); + memset(qh.MsgFrom, ' ', 25); memcpy(qh.MsgFrom, jsp->Fields[z]->Buffer, len); } if (jsp->Fields[z]->LoID == JAMSFLD_RECVRNAME) { @@ -201,7 +201,7 @@ int export_messages(int baseno, char *basefilename, int qwkidx) { } else { len = jsp->Fields[z]->DatLen; } - memset(qh.MsgTo, 0, 25); + memset(qh.MsgTo, ' ', 25); memcpy(qh.MsgTo, jsp->Fields[z]->Buffer, len); } } @@ -238,7 +238,7 @@ int export_messages(int baseno, char *basefilename, int qwkidx) { msgptr++; } - msgptr = msgbuf + lenbytes; + msgptr = &msgbuf[lenbytes]; while (*msgptr == '\0') { *msgptr = ' '; msgptr--;