fix BWU compatibility

This commit is contained in:
vms 2021-09-03 13:49:23 +03:00
parent b07df8ab66
commit 5b9324916d
2 changed files with 10 additions and 1 deletions

View File

@ -231,6 +231,7 @@
(@interface func (type 19)
arg.get 0
string.size
i32.push 1
call-core 0
arg.get 0
string.lower_memory
@ -238,6 +239,7 @@
i32.from_s32
arg.get 2
string.size
i32.push 1
call-core 0
arg.get 2
string.lower_memory
@ -307,6 +309,7 @@
i32.from_u32
arg.get 1
string.size
i32.push 1
call-core 0
arg.get 1
string.lower_memory
@ -349,6 +352,7 @@
i32.from_s32
arg.get 2
string.size
i32.push 1
call-core 0
arg.get 2
string.lower_memory
@ -366,6 +370,7 @@
i32.from_u32
arg.get 1
string.size
i32.push 1
call-core 0
arg.get 1
string.lower_memory

View File

@ -8,7 +8,11 @@ int RESULT_SIZE;
cvector_vector_type(void *) OBJECTS_TO_RELEASE;
void* allocate(size_t size) {
void* allocate(size_t size, size_t _type_tag) {
if (size == 0 || size + 1 == 0) {
return 0;
}
// this +1 is needed to append then zero byte to strings passing to this module.
return malloc(size + 1);
}