mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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() );
|
js.append( type.getVTable() );
|
||||||
} else {
|
} else {
|
||||||
AnyType fieldType = storageType.getType();
|
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' );
|
js.append( '0' );
|
||||||
} else {
|
} else {
|
||||||
js.append( "null" );
|
js.append( "null" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user