Skip to content
Snippets Groups Projects
Commit 2aa805d5 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Log the problem codepoint when reporting error in utf8_encode()

parent b0566fc0
Branches
Tags
No related merge requests found
...@@ -4612,7 +4612,7 @@ js_utf8_encode(JSContext *cx, uintN argc, jsval *arglist) ...@@ -4612,7 +4612,7 @@ js_utf8_encode(JSContext *cx, uintN argc, jsval *arglist)
int result = utf8_putc(outbuf, len - 1, codepoint); int result = utf8_putc(outbuf, len - 1, codepoint);
if(result < 1) { if(result < 1) {
free(outbuf); free(outbuf);
JS_ReportError(cx, "utf8_encode: error: %d", result); JS_ReportError(cx, "utf8_encode: error: %d for codepoint %X", result, codepoint);
return JS_FALSE; return JS_FALSE;
} }
outbuf[result] = 0; outbuf[result] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment