math.big: make ./v -prod -cstrict -cc gcc-11 test vlib/math/ pass cleanly (workaround a problem in V's cgen, that -cstrict discovered)

This commit is contained in:
Delyan Angelov 2025-03-08 13:45:26 +02:00
parent e66e9960d3
commit 4877417adf
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -175,7 +175,7 @@ pub fn integer_from_radix(all_characters string, radix u32) !Integer {
return error('math.big: Radix must be between 2 and 36 (inclusive)')
}
characters := all_characters.to_lower()
validate_string(characters, radix)!
validate_string(characters, radix) or { return err }
return match radix {
2 {
integer_from_special_string(characters, 1)