mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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 );
|
type = localTypes.get( i );
|
||||||
String paramName = null;
|
String paramName = null;
|
||||||
if( variables != null ) {
|
if( variables != null ) {
|
||||||
LocalVariable variable = variables.getPosition( paramCount + i );
|
int idx = paramCount + i;
|
||||||
if( variable != null ) {
|
if( idx < variables.getPositionSize() ) {
|
||||||
paramName = variable.getName();
|
LocalVariable variable = variables.getPosition( idx );
|
||||||
|
if( variable != null ) {
|
||||||
|
paramName = variable.getName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.writeMethodParam( "local", type, paramName );
|
writer.writeMethodParam( "local", type, paramName );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user