GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 89f1ab0f authored by rockon999's avatar rockon999

Fix UTF8 encoding for some GJS string arrays.

- The function that constructs string arrays for imports and argv utilized a JS_NewStringCopyZ call instead of the proper JS_NewStringCopyUTF8Z (the input is UTF8).
parent 4a28c6b2
......@@ -313,8 +313,9 @@ gjs_build_string_array(JSContext *context,
g_error("Unable to reserve memory for vector");
for (i = 0; i < array_length; ++i) {
JS::ConstUTF8CharsZ chars(array_values[i], strlen(array_values[i]));
JS::RootedValue element(context,
JS::StringValue(JS_NewStringCopyZ(context, array_values[i])));
JS::StringValue(JS_NewStringCopyUTF8Z(context, chars)));
if (!elems.append(element))
g_error("Unable to append to vector");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment