https://bugs.winehq.org/show_bug.cgi?id=57148
Bug ID: 57148 Summary: ghidraRun.bat shows: Syntax error: unexpected IN Product: Wine Version: 9.16 Hardware: x86-64 OS: Linux Status: NEW Severity: minor Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: bernhardu@mailbox.org Distribution: ---
For starting up ghidra a batch file "ghidraRun.bat" can be used.
This shows the messages: C:\ghidra_11.1.2_PUBLIC>:: Ghidra launch Syntax error Syntax error: unexpected IN ...
This is because there developers decided to use %# as iterator variable. Indeed native can handle almost all ascii character above space until tilde except these: "&,;<=>^|
The application starts up successfully because this should just detect if it got started via a doubleclick or from a console window, so this is just a minor issue.
https://github.com/NationalSecurityAgency/ghidra/blob/184180d54dbdf3db3c030e...
https://bugs.winehq.org/show_bug.cgi?id=57148
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ghidraRun.bat shows: Syntax |cmd,for: ghidraRun.bat |error: unexpected IN |shows: Syntax error: | |unexpected IN
https://bugs.winehq.org/show_bug.cgi?id=57148
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Created attachment 77059 --> https://bugs.winehq.org/attachment.cgi?id=77059 tentative patch
actually, the situation is even worse than that see https://www.robvanderwoude.com/clevertricks.php#FORListExtended where some variables could be escaped! (and # is even not listed as a possible variable) the attached patch should handle the issue (untested)
https://bugs.winehq.org/show_bug.cgi?id=57148
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=57148
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, source
https://bugs.winehq.org/show_bug.cgi?id=57148
--- Comment #2 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Eric Pouech from comment #1)
tentative patch
Thanks for having a look.
Sorry, I missed to add a shorter reproducer than the linked batch file: wine cmd for /f "tokens=2" %# in ("a b c") do @echo %#
I can confirm with the tentative patch above command and also the ghidra startup batch file are no longer showing the syntax error.
https://bugs.winehq.org/show_bug.cgi?id=57148
--- Comment #3 from Eric Pouech eric.pouech@gmail.com --- submitted https://gitlab.winehq.org/wine/wine/-/merge_requests/6577 which should tackle most of the remaining variables in FOR loops
(different solution, yet more generic) than the one attached to #1