mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
2da01c607f
rewrite ceiling division to avoid signed overflow. the expression (count + 1) / 2 triggers undefined behavior when count == INT_MAX. use count / 2 + (count & 1) instead, which computes the same result without intermediate overflow. Co-authored-by: Claude <noreply@anthropic.com>