https://bugs.winehq.org/show_bug.cgi?id=53678
Bug ID: 53678 Summary: vbscript can not compile CaseClausules that do not use a colon Product: Wine Version: 7.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
While working on leveraging the vbscript engine of Wine for a macos port of Visual Pinball, I've been testing several user made scripts.
I've found a few scripts, where users did not use a colon after a case. This seems to work in vbscript:
Set g_objWSH = Wscript.CreateObject("Wscript.Shell")
dim x
x = 2
Select Case x Case 0: 'If Enabled Then Case 2 Wscript.Echo "This works 2" Case 3: Wscript.Echo "This works 3" Case 4 Wscript.Echo "This works 4" End Select
https://bugs.winehq.org/show_bug.cgi?id=53678
Jason Millard jsm174@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm174@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=53678
Robert Wilhelm sloper42@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sloper42@yahoo.com
--- Comment #1 from Robert Wilhelm sloper42@yahoo.com --- Created attachment 73090 --> https://bugs.winehq.org/attachment.cgi?id=73090 patch
https://bugs.winehq.org/show_bug.cgi?id=53678
Robert Wilhelm sloper42@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=53678
Robert Wilhelm sloper42@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #2 from Robert Wilhelm sloper42@yahoo.com --- confirming.
https://bugs.winehq.org/show_bug.cgi?id=53678
--- Comment #3 from Jason Millard jsm174@gmail.com --- Just test this patch. Works great! Thanks again!
https://bugs.winehq.org/show_bug.cgi?id=53678
--- Comment #4 from Jason Millard jsm174@gmail.com --- I just ran into another script that uses "Case ELSE" without a colon:
"Case Else vpmKeyUp = False"
Updated CaseClausules as:
CaseClausules : /* empty */ { $$ = NULL; } | tCASE tELSE StSep StatementsNl_opt { $$ = new_case_clausule(ctx, NULL, $4, NULL); } | tCASE tELSE StatementsNl_opt { $$ = new_case_clausule(ctx, NULL, $3, NULL); } | tCASE ExpressionList StSep StatementsNl_opt CaseClausules { $$ = new_case_clausule(ctx, $2, $4, $5); } | tCASE ExpressionList StatementsNl_opt CaseClausules { $$ = new_case_clausule(ctx, $2, $3, $4); }
https://bugs.winehq.org/show_bug.cgi?id=53678
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- In this case we'll probably use StStep_opt then? Jason, Robert, are you going to fix that up and submit a patch?
https://bugs.winehq.org/show_bug.cgi?id=53678
--- Comment #6 from Robert Wilhelm sloper42@yahoo.com --- I am quite busy these days but I plan to start again submitting patches in about one week.
https://bugs.winehq.org/show_bug.cgi?id=53678
--- Comment #7 from Jason Millard jsm174@gmail.com --- (In reply to Nikolay Sivov from comment #5)
In this case we'll probably use StStep_opt then? Jason, Robert, are you going to fix that up and submit a patch?
Sorry I didn't see this comment, but I see the MR today. Thanks again for getting this fixed!
https://bugs.winehq.org/show_bug.cgi?id=53678
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |39058487ecddf8e528cab226f66 | |c99d2c4790a22 Resolution|--- |FIXED
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com --- Marking fixed, 39058487ecddf8e528cab226f66c99d2c4790a22.
https://bugs.winehq.org/show_bug.cgi?id=53678
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc1.