Module: wine Branch: master Commit: 571125455eb97fc6473e9e16b9598f24204e64a7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=571125455eb97fc6473e9e16b9...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Oct 21 22:45:30 2009 +0200
jscript: Fixed replace string parsing.
Reported by Dan Kegel.
---
dlls/jscript/string.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index 2e48d5b..97c807f 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -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) {