[Bug 57809] New: cmd: Incorrect substring expansion of last character (e.g. `!MY_STR:~1!`)
https://bugs.winehq.org/show_bug.cgi?id=57809 Bug ID: 57809 Summary: cmd: Incorrect substring expansion of last character (e.g. `!MY_STR:~1!`) Product: Wine Version: 10.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: cmd Assignee: wine-bugs(a)winehq.org Reporter: Dominik-Home(a)gmx.de Distribution: --- Call the following script and observe the different output on Windows and Wine. Substring expansion seems to work in general except the last character, therefore MY_STR is set to 1 character to trigger the issue immediately. Note that I've focused on the issue at hand and haven't tried out other variations of substring-expansion. issue_substring_expansion.bat ```cmd @echo off setlocal enableextensions enabledelayedexpansion set MY_STR=R echo "!MY_STR:~1!" REM Prints "" on Windows REM Prints "R" on Wine ``` This issue is blocking to get PlanAhead (part of Xilinx ISE 14.7) to work. Multiple batch scripts set-up the environment before starting the GUI. Because of this issue, they end up in an endless loop while iterating over all characters in a variable similar to PATH. My version: ```console $ wine --version wine-10.0 (Staging) ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57809 --- Comment #1 from Dominik-Home(a)gmx.de --- Created attachment 78028 --> https://bugs.winehq.org/attachment.cgi?id=78028 0001-Fix-57809.patch Fixes the incorrect sub-string expansion but haven't checked if this has unintended side effects. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57809 Eric Pouech <eric.pouech(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech(a)gmail.com --- Comment #2 from Eric Pouech <eric.pouech(a)gmail.com> --- submitted https://gitlab.winehq.org/wine/wine/-/merge_requests/7301 that shall fix this issue (among other things) (same fix as what's in #2, but includes also handling the error cases in parsing -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57809 Eric Pouech <eric.pouech(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |28b3a2d688594442b992c31593f | |ab068191a507e --- Comment #3 from Eric Pouech <eric.pouech(a)gmail.com> --- resolved fixed -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57809 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57809 --- Comment #5 from Dominik-Home(a)gmx.de --- I'm confirming the fix in 10.2. Thank you very much! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla