mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-14 18:43:27 +01:00
Default values for long must in JavaScript 0n else it can't be converted to wasm i64.
This commit is contained in:
parent
2cdb0244d1
commit
9b3bf52173
@ -120,7 +120,9 @@ class WasmStructInstruction extends WasmInstruction {
|
||||
js.append( type.getVTable() );
|
||||
} else {
|
||||
AnyType fieldType = storageType.getType();
|
||||
if( fieldType instanceof ValueType && fieldType != ValueType.externref ) {
|
||||
if( fieldType == ValueType.i64 ) {
|
||||
js.append( "0n" );
|
||||
} else if( fieldType instanceof ValueType && fieldType != ValueType.externref ) {
|
||||
js.append( '0' );
|
||||
} else {
|
||||
js.append( "null" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user