From: Eric Pouech epouech@codeweavers.com
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=57912
Signed-off-by: Eric Pouech epouech@codeweavers.com --- programs/cmd/tests/test_builtins.cmd.exp | 2 +- programs/cmd/wcmdmain.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 571f2da01e5..a1d55c247fc 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -1030,7 +1030,7 @@ with closing bracket 255 two lines before both blocks 255 nested -@todo_wine@0 unmatched +0 unmatched --- case sensitivity with and without /i option if seems to default to case sensitivity if /i seems to work diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 7e061b3bc3c..8f0d0d636b7 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -3553,6 +3553,9 @@ enum read_parse_line WCMD_ReadAndParseLine(CMD_NODE **output) curRedirs, &curRedirsLen, &curCopyTo, &curLen); node_builder_push_token(&builder, TKN_CLOSEPAR); + } else if (curStringLen == 0 && curCopyTo == curString) { + /* unmatched closing ')': silently skip rest of line */ + curPos += wcslen(curPos) - 1; } else { curCopyTo[(*curLen)++] = *curPos; }