[wasm-api-buffer] Minor variable

This commit is contained in:
Behdad Esfahbod 2023-02-25 10:44:45 -07:00
parent 4260de12c1
commit 91eb2f49db
1 changed files with 3 additions and 2 deletions

View File

@ -133,8 +133,9 @@ HB_WASM_API (bool_t, buffer_copy_contents) (HB_WASM_EXEC_ENV
module_free (contents->pos);
contents->length = length;
contents->info = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->info, length * sizeof (buffer->info[0]));
contents->pos = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->pos, length * sizeof (buffer->pos[0]));
unsigned bytes = length * sizeof (hb_glyph_info_t);
contents->info = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->info, bytes);
contents->pos = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->pos, bytes);
if (length && (!contents->info || !contents->pos))
{