cmd: Fix substring substitution in variable expansion.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57290
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2024-11-04 09:03:12 +01:00 committed by Alexandre Julliard
parent 888723eedb
commit 94c61ed7c8
Notes: Alexandre Julliard 2024-11-12 22:01:42 +01:00
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6803
2 changed files with 2 additions and 4 deletions

View file

@ -760,9 +760,9 @@ e@or_broken@qwerty
''@or_broken@'qwerty'
r@or_broken@qwerty
ty
@todo_wine@azertyazERTY
azertyazERTY
ertyERTY
@todo_wine@=_QWERTY
=_QWERTY
QWERTY
mmydir
------------ Testing variable substitution ------------

View file

@ -638,8 +638,6 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start)
if (equalspos == NULL) return start+1;
s = xstrdupW(endOfVar + 1);
/* Null terminate both strings */
thisVar[lstrlenW(thisVar)-1] = 0x00;
*equalspos = 0x00;
/* Since we need to be case insensitive, copy the 2 buffers */