Fix for Issue #744
Don't increment the current position in case of a continuation byte. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
committed by
László Langó
parent
c61e822a45
commit
dc83e995d2
@@ -1017,7 +1017,11 @@ ecma_builtin_string_prototype_object_replace_get_string (ecma_builtin_replace_se
|
||||
previous_start = current_position + 1;
|
||||
}
|
||||
|
||||
current_position++;
|
||||
/* if not a continuation byte */
|
||||
if ((*replace_str_curr_p & LIT_UTF8_EXTRA_BYTE_MASK) != LIT_UTF8_EXTRA_BYTE_MARKER)
|
||||
{
|
||||
current_position++;
|
||||
}
|
||||
}
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
|
||||
Reference in New Issue
Block a user