mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 18:47:07 +00:00
cmd: Fixed var substring in 'enableDelayedExpansion' mode.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55402
This commit is contained in:
parent
bd10252332
commit
7e4715149a
|
@ -1275,6 +1275,17 @@ set x=C:\Program Files (x86)
|
|||
if ""=="" set y=%x%\dummy
|
||||
echo %y%
|
||||
|
||||
echo --- Testing if + var subst in delayed expansion mode
|
||||
setlocal enableDelayedExpansion
|
||||
for %%i in (abc 10.0 11.0) do (
|
||||
set result=%%i
|
||||
echo [DEBUG] checking {!result!}
|
||||
if "!result:~0,3!"=="10." (
|
||||
echo SDKVER=!result!
|
||||
)
|
||||
)
|
||||
endlocal
|
||||
|
||||
echo ------------ Testing for ------------
|
||||
echo --- plain FOR
|
||||
for %%i in (A B C) do echo %%i
|
||||
|
|
|
@ -927,6 +927,11 @@ x@space@
|
|||
A
|
||||
------------ Testing if/set ------------
|
||||
C:\Program Files (x86)\dummy
|
||||
--- Testing if + var subst in delayed expansion mode
|
||||
[DEBUG] checking {abc}
|
||||
[DEBUG] checking {10.0}
|
||||
SDKVER=10.0
|
||||
[DEBUG] checking {11.0}
|
||||
------------ Testing for ------------
|
||||
--- plain FOR
|
||||
A
|
||||
|
|
|
@ -596,7 +596,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR startchar)
|
|||
/* If there's complex substitution, just need %var% for now
|
||||
to get the expanded data to play with */
|
||||
if (colonpos) {
|
||||
*colonpos = startchar;
|
||||
*colonpos = '%';
|
||||
savedchar = *(colonpos+1);
|
||||
*(colonpos+1) = 0x00;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue