From 123a053b55ffae7e9e49e4f3e4e50647656d3398 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 11 Jan 2023 19:34:51 +0100 Subject: [PATCH] [smjs] Assertion failure --- src/scripting/smjs/core.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/scripting/smjs/core.cpp b/src/scripting/smjs/core.cpp index e02e3783..a63a062f 100644 --- a/src/scripting/smjs/core.cpp +++ b/src/scripting/smjs/core.cpp @@ -239,10 +239,7 @@ add_jschars_to_utf8_string(struct string *utf8, } } - if (unicode == 0) { - if (!add_char_to_string(utf8, '\0')) - return NULL; - } else { + if (unicode) { if (!add_to_string(utf8, encode_utf8(unicode))) return NULL; }