aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.cff2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cff b/src/util.cff
index 30175a3..c56486b 100644
--- a/src/util.cff
+++ b/src/util.cff
@@ -60,7 +60,7 @@ extern fn addfilepath(s *const u8) int {
} else if streq(filepaths[i], s) {
return i;
}
- } while ++i != i0;
+ } while (i = (i + 1) % filepaths.#len) != i0;
assert(nfilepaths++ < filepaths.#len, "too many files");
filepaths[i] = s;