https://bugs.winehq.org/show_bug.cgi?id=56498
Bug ID: 56498 Summary: misinterpretation of the '/' character Product: Wine Version: 9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: ch.panel@free.fr Distribution: ---
this sequence causes two different results on wine and windows : (french date)
echo off cls echo %date% set year=%date:~6,4% echo %year% pause
on windows :
29/03/2024 2024
on wine :
29/03/2024 202
wine seems to interpret / as an escape character
https://bugs.winehq.org/show_bug.cgi?id=56498
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- actually, doing
set "d=30/03/2024" set year=%d:~6,4% echo %year%
gives the expected result
there's a off by one in the computation of the length of expansion of variables: the length of "magic" variables (like DATE, TIME, CD...) isn't coherent the length of "non magic" variables
I'll send a patch later on
https://bugs.winehq.org/show_bug.cgi?id=56498
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|misinterpretation of the |Incorrect substring |'/' character |expansion for magic | |variables
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- changed title to reflect real issue
https://bugs.winehq.org/show_bug.cgi?id=56498
--- Comment #3 from Eric Pouech eric.pouech@gmail.com --- https://gitlab.winehq.org/wine/wine/-/merge_requests/5428 should take care of this
https://bugs.winehq.org/show_bug.cgi?id=56498
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7f60584a9032664c3904ac563e6 | |5efe70be60814 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED
--- Comment #4 from Eric Pouech eric.pouech@gmail.com --- change has been merged
https://bugs.winehq.org/show_bug.cgi?id=56498
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.9.
https://bugs.winehq.org/show_bug.cgi?id=56498
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x