Fix failing assertion with backslash at EOF in macro arguments (#1634)

`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.
This commit is contained in:
Rangi authored and GitHub committed 2025-01-28 21:51:11 -05:00
1 parent a59867cd78
commit c19ddc80f0
12 files changed
+49 -5

No files matched your search

+3 -2
View File
@@ -509,8 +509,9 @@ void BufferedContent::advance() {
if (offset == std::size(buf)) {
offset = 0; // Wrap around if necessary
}
assume(size > 0);
size--;
if (size > 0) {
size--;
}
}
void BufferedContent::refill() {