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:
robertsipka
2016-09-08 14:05:14 +02:00
committed by László Langó
parent c61e822a45
commit dc83e995d2
2 changed files with 10 additions and 1 deletions
@@ -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))