fix bug with empty complex types

This commit is contained in:
vms 2020-07-28 01:18:19 +03:00
parent eb3dbcb835
commit 33ce6228c8

View File

@ -332,7 +332,7 @@ where
InterfaceValue::F32(value) => result.push(value as _),
InterfaceValue::F64(value) => result.push(value.to_bits()),
InterfaceValue::String(value) => {
let string_pointer = if value.is_empty() {
let string_pointer = if !value.is_empty() {
write_to_instance_mem(instance, instruction, value.as_bytes())?
} else {
0i32
@ -343,7 +343,7 @@ where
}
InterfaceValue::ByteArray(value) => {
let byte_array_pointer = if value.is_empty() {
let byte_array_pointer = if !value.is_empty() {
write_to_instance_mem(instance, instruction, &value)?
} else {
0i32