https://bugs.winehq.org/show_bug.cgi?id=41914
Bug ID: 41914 Summary: incorrect execute path within nested if (else) statement Product: Wine Version: 1.9.23 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: unya_zk_gf@hotmail.co.jp Distribution: ---
When we execute the following batch command on wine's cmd
if "x" == "a" ( ) else ( echo 11 if "y" == "b" echo 12 echo 13 ) echo 20
normally 11 13 20 should be displayed.
but in version 1.9.23 (cmd /version: Microsoft Windows 6.1.7601 (1.9.23)), it displays 11 20. (13 is skipped.)
Apparently it seems that it jumps to the end of the "else" clause of the outer "if" when there is no corresponding "else" clause whose inner "if" condition is false.