Test and fix CESU-8 handling in String builtins.

Fixes #757
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
This commit is contained in:
Laszlo Vidacs
2015-12-01 17:06:27 +01:00
committed by Evgeny Gavrin
parent cb0087b517
commit b8b3b1f275
3 changed files with 36 additions and 4 deletions
@@ -594,7 +594,11 @@ ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, /**< index
ecma_length_t index = start_pos;
lit_utf8_byte_t *original_str_curr_p = original_str_utf8_p + index;
lit_utf8_byte_t *original_str_curr_p = original_str_utf8_p;
for (ecma_length_t idx = 0; idx < index; idx++)
{
lit_utf8_incr (&original_str_curr_p);
}
/* create utf8 string from search string */
MEM_DEFINE_LOCAL_ARRAY (search_str_utf8_p,