March 18, 2026
3:14 p.m.
When a For..To loop's bound expression fails (e.g. UBound on Empty) and On Error Resume Next is active, the error handler fills the step/to stack slots with VT_EMPTY. On the next iteration, VarCmp fails on these values and the error propagates back into the loop, causing an infinite loop. Fix this by handling VarCmp failures in interp_step: exit the loop and report error 92 (For loop not initialized). Also make interp_incc ignore VarAdd failures so execution reaches interp_step for proper cleanup. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54291 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10366