[Bug 53844] New: vbscript invoke_vbdisp not handling let property correctly for VT_DISPATCH arguments
https://bugs.winehq.org/show_bug.cgi?id=53844 Bug ID: 53844 Summary: vbscript invoke_vbdisp not handling let property correctly for VT_DISPATCH arguments Product: Wine Version: 7.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: jsm174(a)gmail.com Distribution: --- Given the following code where 'LeftFlipper' is Dispatch object: dim LF : Set LF = New FlipperPolarity LF.Object = LeftFlipper Class FlipperPolarity private Flipper Public Sub Class_Initialize End Sub Public Property let Object(aInput) : Set Flipper = aInput : End Property End Class In invoke_vbdisp, the Object property is stored in This->desc->funcs[id].entries[VBDISP_LET] The code tries to find the function using the VBDISP_SET index since the argument is VT_DISPATCH: func = This->desc->funcs[id].entries[V_VT(dp.rgvarg) == VT_DISPATCH ? VBDISP_SET : VBDISP_LET]; At first I tried to reverse the order figuring maybe this was a typo, however then it broke let's with non-objects. So as a hack I did this: func = This->desc->funcs[id].entries[V_VT(dp.rgvarg) == VT_DISPATCH ? VBDISP_SET : VBDISP_LET]; if(!func) func = This->desc->funcs[id].entries[VBDISP_LET]; if(!func) { FIXME("no letter/setter\n"); -- 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=53844 francisdb <francisdb(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francisdb(a)gmail.com --- Comment #1 from francisdb <francisdb(a)gmail.com> --- Minimal reproducer and workaround below. Class EmptyClass End Class Class Test private prop Public Property Let Object(aInput) : Set prop = aInput : End Property End Class dim T : Set T = New Test dim EC : Set EC = New EmptyClass T.Object = EC Above code yields a VBSE_OLE_NO_PROP_OR_METHOD A workaround seems to be to replace the Let by Set and use Set on the assignment. Class EmptyClass End Class Class Test private prop Public Property Set Object(aInput) : Set prop = aInput : End Property End Class dim T : Set T = New Test dim EC : Set EC = New EmptyClass Set T.Object = EC -- 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