mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
9a7211bb25
The previous implementation of mrb_int_mul_overflow performed the multiplication before checking for overflow. This is undefined behavior for signed integers and can lead to incorrect results on some compilers (e.g., MSVC). The implementation has been changed to perform the overflow checks before the multiplication. Co-authored-by: Gemini <gemini@google.com>