[wasm-api-buffer] Minor variable
This commit is contained in:
parent
4260de12c1
commit
91eb2f49db
|
@ -133,8 +133,9 @@ HB_WASM_API (bool_t, buffer_copy_contents) (HB_WASM_EXEC_ENV
|
||||||
module_free (contents->pos);
|
module_free (contents->pos);
|
||||||
|
|
||||||
contents->length = length;
|
contents->length = length;
|
||||||
contents->info = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->info, length * sizeof (buffer->info[0]));
|
unsigned bytes = length * sizeof (hb_glyph_info_t);
|
||||||
contents->pos = wasm_runtime_module_dup_data (module_inst, (const char *) buffer->pos, length * sizeof (buffer->pos[0]));
|
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))
|
if (length && (!contents->info || !contents->pos))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue