Commit 2bc1d73f authored by Rob Swindell's avatar Rob Swindell

Fix NDX file creation when votes are included in QWK packets

When both Indexes (NDX files) and vote messages are included in a QWK packet (an unexpected, but valid combination), the "Record number" stored in NDX files for subs with votes would be incorrect as it did not increment when a vote message (with no body text) was added to the messages.dat file.

Reported by user that was trying to use MultiMail to read a QWK packet that included both votes and indexes and "IgnoreNDX: No" in their .mmailrc file.
parent 9919c23e
Pipeline #327 passed with stage
in 19 minutes and 20 seconds
......@@ -389,8 +389,8 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
size=msgtoqwk(&msg, qwk, mode|QM_REPLYTO, &smb, /* confnum: */0, hdrs);
smb_unlockmsghdr(&smb,&msg);
smb_freemsgmem(&msg);
msgndx++;
if(ndx && size) {
msgndx++;
f=ltomsbin(msgndx); /* Record number */
ch=0; /* Sub number, not used */
if(personal) {
......@@ -529,8 +529,8 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
size=msgtoqwk(&msg, qwk, mode, &smb, conf, hdrs, voting);
smb_unlockmsghdr(&smb,&msg);
msgndx++;
if(ndx && size) {
msgndx++;
f=ltomsbin(msgndx); /* Record number */
ch=0; /* Sub number, not used */
if(personal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment