diff options
| author | 2022-09-01 09:55:07 +0200 | |
|---|---|---|
| committer | 2022-09-01 09:55:18 +0200 | |
| commit | 7654fcc55b73cdecd1a57d5962da418dcaec4231 (patch) | |
| tree | 2bb5aefb5f9965c9d04624552d1f9ffd27b6d2a8 | |
| parent | 69db8de9074bd0e93e07105871329ed81fbeff4c (diff) | |
fix filepaths set edge case
| -rw-r--r-- | src/util.cff | 2 |
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; |