mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +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();
|
||||
writeCodeChunk( byteCode, -1 );
|
||||
}
|
||||
for( int i = 0; i < paramCount; i++ ) {
|
||||
for( int i = Math.min( paramCount, locals.size() ); i > 0; i-- ) {
|
||||
locals.remove( 0 );
|
||||
}
|
||||
writeMethodFinish( locals );
|
||||
|
Loading…
x
Reference in New Issue
Block a user