aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--irdump.c1
-rw-r--r--lex.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/irdump.c b/irdump.c
index d94b9bb..1dd19fb 100644
--- a/irdump.c
+++ b/irdump.c
@@ -247,6 +247,7 @@ irdump(struct function *fn)
blk = fn->entry;
do {
dumpblk(fn, blk);
+ assert(blk->lnext != NULL);
} while ((blk = blk->lnext) != fn->entry);
efmt("\n");
}
diff --git a/lex.h b/lex.h
index 3c1d431..3de4f6e 100644
--- a/lex.h
+++ b/lex.h
@@ -4,7 +4,7 @@ static inline bool
joinspan(struct span0 *dst, struct span0 snd)
{
if (dst->file != snd.file) return 0;
- assert(dst->off <= snd.off);
+ if (dst->off > snd.off) return 0;
dst->len = snd.off + snd.len - dst->off;
return 1;
}