https://bugs.winehq.org/show_bug.cgi?id=47798
Bug ID: 47798 Summary: Incorrect substring result using enableDelayedExpansion Product: Wine Version: 4.16 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: lois.diqual@gmail.com Distribution: ---
Created attachment 65289 --> https://bugs.winehq.org/attachment.cgi?id=65289 Test file
Batch variable substring yields incorrect results when using enableDelayedExpansion.
setlocal enableDelayedExpansion set foo=bar echo "!foo:~0,2!" endlocal
Expected output: "ba"
Actual output: - Wine cmd: "~0,2" - Windows cmd: "ba"
https://bugs.winehq.org/show_bug.cgi?id=47798
Axel Gembe derago@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |derago@gmail.com
--- Comment #1 from Axel Gembe derago@gmail.com --- This is likely a duplicate of https://bugs.winehq.org/show_bug.cgi?id=38289
https://bugs.winehq.org/show_bug.cgi?id=47798
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED CC| |infyquest@gmail.com Fixed by SHA1| |6c39db0ca01a93003d2fbf2581f | |c2c3fcb3266c8
--- Comment #2 from Vijay Kamuju infyquest@gmail.com --- This is fixed in new cmd rewrite, if you are using !foo:~0,2! which is used only in powershell not normal bat file used. Fixed in https://source.winehq.org/git/wine.git/commit/6c39db0ca01a93003d2fbf2581fc2c...
https://bugs.winehq.org/show_bug.cgi?id=47798
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.12.