ref: 21b5656d899728c7998436a74b157d86415184d4
parent: a84a5c21ce23abfa3ab579f51d3152dcfc1ee1b3
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 19 15:57:24 EST 2017
upas/fs: more bugs
--- a/sys/src/cmd/upas/fs/idx.c
+++ b/sys/src/cmd/upas/fs/idx.c
@@ -197,7 +197,7 @@
Message *m;
for(m = parent->part; m; m = m->next)
- if(!m->digest && n-- == 0)
+ if(m->digest == nil && n-- == 0)
return m;
return 0;
}
--- a/sys/src/cmd/upas/fs/mbox.c
+++ b/sys/src/cmd/upas/fs/mbox.c
@@ -596,7 +596,7 @@
parse(Mailbox *mb, Message *m, int addfrom, int justmime)
{
sanemsg(m);
- assert(m->end - m->start > 0 || m->mimeflag&Mtrunc && m->end - m->start == 0);
+ assert(m->end - m->start > 0 || (m->mimeflag&Mtrunc) != 0 && m->end - m->start == 0);
if((m->cstate & Cheader) == 0)
parseheaders(mb, m, addfrom, justmime);
parsebody(m, mb);