Commit 57112545 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Fixed replace string parsing.

Reported by Dan Kegel.
parent 0c879461
......@@ -965,7 +965,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
}
idx = ptr2[1] - '0';
if(isdigitW(ptr[3]) && idx*10 + (ptr[2]-'0') <= parens_cnt) {
if(isdigitW(ptr2[2]) && idx*10 + (ptr2[2]-'0') <= parens_cnt) {
idx = idx*10 + (ptr[2]-'0');
ptr = ptr2+3;
}else if(idx && idx <= parens_cnt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment