aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/games/gluegen/CMethodBindingEmitter.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/java/games/gluegen/CMethodBindingEmitter.java b/src/net/java/games/gluegen/CMethodBindingEmitter.java
index e72c0ab77..e65b8ca00 100644
--- a/src/net/java/games/gluegen/CMethodBindingEmitter.java
+++ b/src/net/java/games/gluegen/CMethodBindingEmitter.java
@@ -721,7 +721,14 @@ public class CMethodBindingEmitter extends FunctionEmitter
}
writer.println(" /* Clean up " + convName + "_copy */");
+
+ // Re-fetch length of array that was copied
String arrayLenName = "_tmpArrayLen";
+ writer.print(" ");
+ writer.print(arrayLenName);
+ writer.print(" = (*env)->GetArrayLength(env, ");
+ writer.print(binding.getArgumentName(i));
+ writer.println(");");
// free each element
PointerType cArgPtrType = cArgType.asPointer();