瀏覽代碼

Merge pull request #5210 from Barinzaya/core-math-big-range-check

Fix range check in `core:math/big`'s `int_atoi`
Jeroen van Rijn 4 月之前
父節點
當前提交
0a6dced9da
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/math/big/radix.odin

+ 1 - 1
core/math/big/radix.odin

@@ -280,7 +280,7 @@ int_atoi :: proc(res: ^Int, input: string, radix := i8(10), allocator := context
 		}
 
 		pos := ch - '+'
-		if RADIX_TABLE_REVERSE_SIZE <= pos {
+		if RADIX_TABLE_REVERSE_SIZE <= u32(pos) {
 			break
 		}
 		y := RADIX_TABLE_REVERSE[pos]