[Bug 57148] New: ghidraRun.bat shows: Syntax error: unexpected IN
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(a)winehq.org Reporter: bernhardu(a)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... -- 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=57148 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ghidraRun.bat shows: Syntax |cmd,for: ghidraRun.bat |error: unexpected IN |shows: Syntax error: | |unexpected IN -- 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=57148 Eric Pouech <eric.pouech(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech(a)gmail.com --- Comment #1 from Eric Pouech <eric.pouech(a)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) -- 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=57148 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- 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=57148 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, source -- 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=57148 --- Comment #2 from Bernhard Übelacker <bernhardu(a)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. -- 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=57148 --- Comment #3 from Eric Pouech <eric.pouech(a)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 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57148 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |d097babd72734616a7129975b0d | |f7b3a7801f6cd Resolution|--- |FIXED --- Comment #4 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Fixed by this commit: https://gitlab.winehq.org/wine/wine/-/commit/d097babd72734616a7129975b0df7b3... -- 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.
http://bugs.winehq.org/show_bug.cgi?id=57148 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.8. -- 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