cmd: if 'if' condition is not met and cmdList->nextCommand is not null, command should be advanced as well
Carlos Rafael Ramirez
crramirez at gmail.com
Wed Oct 26 23:20:33 CDT 2016
Fixes https://bugs.winehq.org/show_bug.cgi?id=33636
Tested on Windows 10 and Ubuntu 16.04.1.
Signed-off-by: Carlos Rafael Ramirez <crramirez at gmail.com>
---
programs/cmd/builtins.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 49c366a..bf72ec9 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -1575,6 +1575,13 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
}
if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand;
} else {
+
+ if (processThese) {
+ *cmdList = WCMD_process_commands(*cmdList, TRUE, FALSE);
+ } else {
+ *cmdList = (*cmdList)->nextcommand;
+ }
+
WINE_TRACE("Found end of this IF statement (next = %p)\n", *cmdList);
break;
}
--
2.7.4
More information about the wine-patches
mailing list