Skip to content

Commit 0c6b5ea

Browse files
Istvan Miklosyichoi
authored andcommitted
Fix incorrect output from JSON.stringify (#2416)
This patch fixes the #2383 issue JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos [email protected]
1 parent a456c90 commit 0c6b5ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jerry-ext/handler/handler-print.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ jerryx_handler_print (const jerry_value_t func_obj_val, /**< function object */
6565
jerry_length_t substr_pos = 0;
6666
jerry_char_t substr_buf[256];
6767

68-
while ((substr_size = jerry_substring_to_char_buffer (str_val,
69-
substr_pos,
70-
substr_pos + 256,
71-
substr_buf,
72-
256)) != 0)
68+
while ((substr_size = jerry_substring_to_utf8_char_buffer (str_val,
69+
substr_pos,
70+
substr_pos + 256,
71+
substr_buf,
72+
256)) != 0)
7373
{
7474
#ifdef JERRY_DEBUGGER
7575
jerry_debugger_send_output (substr_buf, substr_size, JERRY_DEBUGGER_OUTPUT_OK);

0 commit comments

Comments
 (0)