Skip to content
Snippets Groups Projects
Commit f11a30a2 authored by rswindell's avatar rswindell
Browse files

Bugfix: (from changed in rev 1.116), loadposts() was returning uninitialized

elements in the returned message index array, causing locking and
reading msg errors (-110 and -205).
parent 6bb3b538
No related branches found
No related tags found
No related merge requests found
......@@ -2013,7 +2013,7 @@ ulong loadmsgs(post_t** post, ulong ptr)
}
fseek(smb[cur_smb].sid_fp,0L,SEEK_SET);
for(l=0;l<total && !feof(smb[cur_smb].sid_fp); l++) {
for(l=0;l<total && !feof(smb[cur_smb].sid_fp); ) {
if(smb_fread(&smb[cur_smb], &idx,sizeof(idx),smb[cur_smb].sid_fp) != sizeof(idx))
break;
......@@ -2026,7 +2026,7 @@ ulong loadmsgs(post_t** post, ulong ptr)
if(idx.attr&MSG_MODERATED && !(idx.attr&MSG_VALIDATED))
break;
(*post)[l]=idx;
(*post)[l++]=idx;
}
smb_unlocksmbhdr(&smb[cur_smb]);
if(!l)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment