Avoid signed overflow in RGBLINK's +, -, and * (#2060)

RGBASM computes these with unsigned arithmetic and casts back, since
signed overflow is UB in C++, but RGBLINK's RPN evaluator used `int32_t`
directly, so `src/link/patch.cpp` tripped UBSan on lines 117, 121, and
124. Share the three operators through `opmath.cpp` so both evaluators
stay in step.
This commit is contained in:
Max Freedom Pollard
2026-09-07 16:15:07 -04:00
committed by GitHub
parent fdd6cece30
commit 631ef003e7
7 changed files with 35 additions and 7 deletions
Binary file not shown.