Skip to content

Commit

Permalink
Add missing casts on big-endian (WebAssembly#2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 authored Feb 1, 2024
1 parent 38860a9 commit e4a6d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wasm2c/wasm-rt-mem-impl-helper.inc
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ static uint64_t MEMORY_API_NAME(grow_memory_impl)(MEMORY_TYPE* memory,
#endif
#endif
#if WABT_BIG_ENDIAN
memmove(new_data + new_size - old_size, new_data, old_size);
memset(new_data, 0, delta_size);
memmove((void*)(new_data + new_size - old_size), (void*)new_data, old_size);
memset((void*)new_data, 0, delta_size);
#endif
memory->pages = new_pages;
memory->size = new_size;
Expand Down

0 comments on commit e4a6d92

Please sign in to comment.