Andrew Talbot andrew.talbot@talbotville.com writes:
@@ -4037,6 +4037,7 @@ static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD
V_VT(retv) = VT_BSTR; V_BSTR(retv) = ret;
} case DISPATCH_PROPERTYPUT: return S_OK;/* fall through */
I don't think that PROPERTYGET is supposed to fall through to PROPERTYPUT.
On Sat, Oct 8, 2011 at 14:58, Alexandre Julliard julliard@winehq.org wrote:
Andrew Talbot andrew.talbot@talbotville.com writes:
@@ -4037,6 +4037,7 @@ static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD
V_VT(retv) = VT_BSTR; V_BSTR(retv) = ret;
- /* fall through */
} case DISPATCH_PROPERTYPUT: return S_OK;
I don't think that PROPERTYGET is supposed to fall through to PROPERTYPUT.
Isn't it that way just to save the use of an extra return S_OK? Instead a break could be used too because that function returns S_OK by default.
http://source.winehq.org/source/dlls/jscript/regexp.c#L4025
Best regards, Bruno
Isn't it that way just to save the use of an extra return S_OK? Instead a break could be used too because that function returns S_OK by default.
http://source.winehq.org/source/dlls/jscript/regexp.c#L4025
Best regards, Bruno
A fall-through would indeed be lazy and not in the spirit of the fact that DISPATCH_PROPERTYGET and DISPATCH_PROPERTYPUT are kind of the opposite of each other. It either requires a break in both places (for consistency) to the common "return S_OK" or two immediate such returns, instead.