mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +01:00
Fix IndexOutOfBoundsException if there are no local variables.
This commit is contained in:
parent
92dc727962
commit
212e18ccfa
@ -95,7 +95,7 @@ public abstract class ModuleWriter implements Closeable {
|
|||||||
CodeInputStream byteCode = code.getByteCode();
|
CodeInputStream byteCode = code.getByteCode();
|
||||||
writeCodeChunk( byteCode, -1 );
|
writeCodeChunk( byteCode, -1 );
|
||||||
}
|
}
|
||||||
for( int i = 0; i < paramCount; i++ ) {
|
for( int i = Math.min( paramCount, locals.size() ); i > 0; i-- ) {
|
||||||
locals.remove( 0 );
|
locals.remove( 0 );
|
||||||
}
|
}
|
||||||
writeMethodFinish( locals );
|
writeMethodFinish( locals );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user