diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-10-04 22:26:15 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-10-04 22:26:15 +0200 |
commit | f6a94ebb2ddecb90933b4012539b7596e5c1fe01 (patch) | |
tree | d255634e11bbca420cd7699419eb765813ac1f74 | |
parent | 5743ce6820c0cfceab4cc71229b5b069b99a8dce (diff) |
Use ssize_t to avoid underflow
-rw-r--r-- | main.l | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -160,7 +160,7 @@ print_ordinal(void) return true; /* Basic binary search */ - for (size_t l = 0, r = positions.len - 1, m; l <= r;) { + for (ssize_t l = 0, r = positions.len - 1, m; l <= r;) { m = l + (r - l) / 2; if (positions.ps[m] == pos) return true; |