Fixed thread tree building in some cases

This commit is contained in:
Alexander S. Aganichev 2003-01-04 10:15:25 +00:00
parent d88d4df4d0
commit 218ab23b01

View File

@ -865,6 +865,7 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) {
strftimei(dbuf, 20, "%d %b %y", gmtime(&dt)); strftimei(dbuf, 20, "%d %b %y", gmtime(&dt));
strcat(buf, dbuf); strcat(buf, dbuf);
} }
strcat(buf, " ");
window.prints(pos, 0, isbar ? sattr : attrw, buf); window.prints(pos, 0, isbar ? sattr : attrw, buf);
window.prints(pos, 6, isbar ? sattr : hattr, marks); window.prints(pos, 6, isbar ? sattr : hattr, marks);
@ -949,13 +950,19 @@ void GThreadlist::BuildThreadIndex(dword msgn) {
AA->LoadHdr(&msg, msgn); AA->LoadHdr(&msg, msgn);
ulong msgno = msg.link.to(); ulong msgno = msg.link.to();
ulong prevmsgno = msgn;
// Search backwards // Search backwards
while(AA->Msgn.ToReln(msgno)) { while(AA->Msgn.ToReln(msgno)) {
if(not AA->LoadHdr(&msg, msgno)) if(not AA->LoadHdr(&msg, msgno)) {
msg.link.to_set(0); msg.link.to_set(0);
msgno = prevmsgno;
AA->LoadHdr(&msg, msgno);
break;
}
prevmsgno = msgno;
msgno = msg.link.to(); msgno = msg.link.to();
} }