Skip to content

Commit b0756f9

Browse files
authored
Merge pull request #2297 from MarenFayre/d-parsing
Fix off by one error in %d parsing
2 parents c3ff1e9 + 658435f commit b0756f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/fmt/fmt.odin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ _parse_int :: proc(s: string, offset: int) -> (result: int, new_offset: int, ok:
547547
is_digit :: #force_inline proc(r: byte) -> bool { return '0' <= r && r <= '9' }
548548

549549
new_offset = offset
550-
for new_offset <= len(s) {
550+
for new_offset < len(s) {
551551
c := s[new_offset]
552552
if !is_digit(c) {
553553
break

0 commit comments

Comments
 (0)