Some minor paranoia to appease valgrind.

This commit is contained in:
2024-03-12 21:44:20 -04:00
parent 439f07162e
commit 88d8e60511
3 changed files with 5 additions and 5 deletions

View File

@ -46,10 +46,10 @@ static JSValue _util_utf8_decode(JSContext* context, JSValueConst this_val, int
}
else
{
size_t offset;
size_t element_size;
size_t offset = 0;
size_t element_size = 0;
JSValue buffer = tf_util_try_get_typed_array_buffer(context, argv[0], &offset, &length, &element_size);
size_t size;
size_t size = 0;
if (!JS_IsException(buffer))
{
array = tf_util_try_get_array_buffer(context, &size, buffer);