March 29, 2026
7:40 p.m.
On Windows, when a For loop expression (from, to, or step) fails with On Error Resume Next, the control variable is not modified and error 92 (For loop not initialized) is set at the next iteration. Wine previously assigned the from value before evaluating to/step. Restructure compile_forto_statement to evaluate all three expressions before assigning to the control variable. On expression failure, error recovery enters the body with empty sentinel values so that OP_step detects the uninitialized state and sets error 92. Also return error 92 from OP_incc when VarAdd fails. -- v3: vbscript: Defer For loop control variable assignment until all expressions are evaluated. https://gitlab.winehq.org/wine/wine/-/merge_requests/10500