Skip to content

Commit 3927ab5

Browse files
committed
Try fixing the failure
`Expansion::advance()` can increase its offset beyond the size, so I don't think this assumption was valid in the first place; `BufferedContent::advance()` should be able to as well.
1 parent 8681ee9 commit 3927ab5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/asm/lexer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,9 @@ void BufferedContent::advance() {
509509
if (offset == std::size(buf)) {
510510
offset = 0; // Wrap around if necessary
511511
}
512-
assume(size > 0);
513-
size--;
512+
if (size > 0) {
513+
size--;
514+
}
514515
}
515516

516517
void BufferedContent::refill() {

0 commit comments

Comments
 (0)