diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2023-01-10 12:24:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-10 12:24:13 +0000 |
| commit | b0756f9e29e434ed69d2822d9773e78ad42737a2 (patch) | |
| tree | ce1596570c7bd76941bde4cb3ffee2b5ceb9b870 | |
| parent | c3ff1e9591794b21dcad9b02ae08cf1372573bff (diff) | |
| parent | 658435f1b9ea263cc2f1559f724211e8333beae3 (diff) | |
Merge pull request #2297 from MarenFayre/d-parsing
Fix off by one error in %d parsing
| -rw-r--r-- | core/fmt/fmt.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index 43931339e..68e498a36 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -547,7 +547,7 @@ _parse_int :: proc(s: string, offset: int) -> (result: int, new_offset: int, ok: is_digit :: #force_inline proc(r: byte) -> bool { return '0' <= r && r <= '9' } new_offset = offset - for new_offset <= len(s) { + for new_offset < len(s) { c := s[new_offset] if !is_digit(c) { break |