fix up qwk toss - empty msgs

This commit is contained in:
Andrew Pamment 2018-06-24 10:56:15 +10:00
parent ecb1c986f0
commit 47e6468501

View File

@ -168,9 +168,9 @@ int process_msgs_dat(char *msgsdat) {
for (i=1;i<msgrecs;i++) { for (i=1;i<msgrecs;i++) {
fread(mbuf, 1, 128, fptr); fread(mbuf, 1, 128, fptr);
if (i == msgrecs - 1) { if (i == msgrecs - 1) {
trimwhitespace(msgbody + (i * 128), 128, mbuf); trimwhitespace(msgbody + ((i-1) * 128), 128, mbuf);
} else { } else {
memcpy(msgbody + (i * 128), mbuf, 128); memcpy(msgbody + ((i-1) * 128), mbuf, 128);
} }
} }