https://bugs.winehq.org/show_bug.cgi?id=53873
Bug ID: 53873 Summary: vbscript fails to compile Else If when If is on same line Product: Wine Version: 7.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
We've found some scripts where If statements are placed on the same line as an Else.
The following works in real vbscript, but fails in wine vbscript:
Dim vrOption vrOption = 3
If vrOption = 1 Then Wscript.Echo "vroption is 1" ElseIf vrOption = 2 Then Wscript.Echo "vroption is 2" Else If vrOption = 3 Then Wscript.Echo "vroption is 3" End If End If
As a workaround we've added an additional entry to tELSE, which seems to work:
Else_opt : /* empty */ { $$ = NULL; } | tELSE tNL StatementsNl_opt { $$ = $3; } | tELSE StatementsNl_opt { $$ = $2; }
https://bugs.winehq.org/show_bug.cgi?id=53873
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 73488 --> https://bugs.winehq.org/attachment.cgi?id=73488 patch
Hi, Jason.
This looks fine to me. Please consider submitting it, together with a test I attached.
https://bugs.winehq.org/show_bug.cgi?id=53873
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=53873
--- Comment #3 from Jason Millard jsm174@gmail.com --- Thanks again!
Submitted as: https://gitlab.winehq.org/wine/wine/-/merge_requests/1385
https://bugs.winehq.org/show_bug.cgi?id=53873
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |502df086eb87312174131648377 | |be84a05d7f077 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- This is now fixed, 502df086eb87312174131648377be84a05d7f077.
https://bugs.winehq.org/show_bug.cgi?id=53873
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.22.
https://bugs.winehq.org/show_bug.cgi?id=53873
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x
https://bugs.winehq.org/show_bug.cgi?id=53873
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |---
--- Comment #6 from Michael Stefaniuc mstefani@winehq.org --- Drop 7.0.x target milestone from bugs that didn't make it.