[Bug 55052] New: For loop where right bound is string coercion issue
https://bugs.winehq.org/show_bug.cgi?id=55052 Bug ID: 55052 Summary: For loop where right bound is string coercion issue Product: Wine Version: 8.9 Hardware: aarch64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: francisdb(a)gmail.com Dim i, num num = "16" For i = 0 To num WScript.Echo i Next On windows using cscript this loops 16 times Using wine vbscript this loops a lot further (at least 5022747) As a workaround you can of course use 16 or CInt(num) -- 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=55052 francisdb <francisdb(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |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=55052 francisdb <francisdb(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|For loop where right bound |vbscript: For loop where |is string coercion issue |right bound is string | |coercion issue -- 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=55052 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |sloper42(a)yahoo.com Ever confirmed|0 |1 --- Comment #1 from Robert Wilhelm <sloper42(a)yahoo.com> --- confirming -- 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=55052 temp82(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |temp82(a)luukku.com --- Comment #2 from temp82(a)luukku.com --- not working correctly wine 8.21. -- 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=55052 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> --- This does not appear to be a VarCmp() issue, unfortunately. It always returns string argument as "greater", so we'll need to coerce explicitly. -- 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=55052 --- Comment #4 from Robert Wilhelm <sloper42(a)yahoo.com> --- Created attachment 75585 --> https://bugs.winehq.org/attachment.cgi?id=75585 coerce "to" This is my wip patch. It fixes the issue. But I have to add additional tests to check whether we need to coerce "for" and "step" and what is right type to coerce to. -- 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=55052 --- Comment #5 from Robert Wilhelm <sloper42(a)yahoo.com> --- Tests show that for iterator, String in coerced to VT_R8 while other numeric types (I tested I2,I4) are not changed. -- 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=55052 --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> --- It's also worth testing what happens to the iteration step argument. I suspect that roughly the idea is to use types that won't produce precision loss, for some definition of loss. E.g. strings are producing floats, and then sum/compare is using either floats unconditionally or when one side is a float. I don't now how to test that properly, maybe using step of "1.6", limit as "2" and see how many iteration this produces. In any case, after converting strings to something numeric, VarCmp() should start working properly. -- 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=55052 --- Comment #7 from Robert Wilhelm <sloper42(a)yahoo.com> --- Created attachment 75594 --> https://bugs.winehq.org/attachment.cgi?id=75594 test case Test show that iterator has always highest precision. E.g. if there is a VT_BSTR in for, to or step, iterator will have type VT_R8. -- 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=55052 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #8 from Robert Wilhelm <sloper42(a)yahoo.com> --- https://gitlab.winehq.org/wine/wine/-/merge_requests/4615 -- 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=55052 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #9 from Robert Wilhelm <sloper42(a)yahoo.com> --- Fixed by https://gitlab.winehq.org/wine/wine/-/commit/e0d027830e6d359d390c257bbb54191... -- 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=55052 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e0d027830e6d359d390c257bbb5 | |419157d9d5aac -- 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=55052 --- Comment #10 from francisdb <francisdb(a)gmail.com> --- Thanks! -- 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=55052 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 9.0-rc1. -- 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