More CodeQL fixes

This commit is contained in:
Kovid Goyal
2025-04-20 22:13:45 +05:30
parent 237bb35ee9
commit 341df0dccb
7 changed files with 20 additions and 22 deletions

View File

@@ -31,8 +31,8 @@ func resolved_char(ch rune, emoji_variation string) string {
}
func decode_hint(text string) int {
x, err := strconv.ParseUint(text, INDEX_BASE, 32)
if err != nil {
x, err := strconv.ParseInt(text, INDEX_BASE, 0)
if err != nil || x < 0 {
return -1
}
return int(x)