From 0a5eb6f3348f84384e31cf04b79fd21b68434a09 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 26 Feb 2026 11:22:14 +0300 Subject: [PATCH] strconv: fix compile error value `100000000000` overflows `u32` (fixes #20877) --- vlib/strconv/f32_ten_pow_table_range_test.v | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vlib/strconv/f32_ten_pow_table_range_test.v diff --git a/vlib/strconv/f32_ten_pow_table_range_test.v b/vlib/strconv/f32_ten_pow_table_range_test.v new file mode 100644 index 000000000..eab04a51f --- /dev/null +++ b/vlib/strconv/f32_ten_pow_table_range_test.v @@ -0,0 +1,6 @@ +module strconv + +fn test_issue_20877_ten_pow_table_32_stays_in_u32_range() { + assert ten_pow_table_32.len == 10 + assert ten_pow_table_32[ten_pow_table_32.len - 1] == u32(1_000_000_000) +} -- 2.39.5