jscript: Don't copy more than needed in parse_string_literal.

This commit is contained in:
Frédéric Delanoy 2011-08-23 11:57:50 +02:00 committed by Alexandre Julliard
parent 6e1ad65dc3
commit 69afb0985d

View file

@ -361,7 +361,7 @@ static int parse_string_literal(parser_ctx_t *ctx, const WCHAR **ret, WCHAR endc
len = ctx->ptr-ptr;
*ret = wstr = parser_alloc(ctx, (len+1)*sizeof(WCHAR));
memcpy(wstr, ptr, (len+1)*sizeof(WCHAR));
memcpy(wstr, ptr, len*sizeof(WCHAR));
wstr[len] = 0;
ctx->ptr++;