mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
Fix ArrayIndexOutOfRange with temp variable
This commit is contained in:
parent
99f7248fc8
commit
6246840f90
@ -394,9 +394,12 @@ public class ModuleGenerator {
|
||||
type = localTypes.get( i );
|
||||
String paramName = null;
|
||||
if( variables != null ) {
|
||||
LocalVariable variable = variables.getPosition( paramCount + i );
|
||||
if( variable != null ) {
|
||||
paramName = variable.getName();
|
||||
int idx = paramCount + i;
|
||||
if( idx < variables.getPositionSize() ) {
|
||||
LocalVariable variable = variables.getPosition( idx );
|
||||
if( variable != null ) {
|
||||
paramName = variable.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.writeMethodParam( "local", type, paramName );
|
||||
|
Loading…
x
Reference in New Issue
Block a user