summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/JavaEmitter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/JavaEmitter.java')
-rw-r--r--src/java/com/jogamp/gluegen/JavaEmitter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java
index a3ee962..770db38 100644
--- a/src/java/com/jogamp/gluegen/JavaEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaEmitter.java
@@ -1410,11 +1410,12 @@ public class JavaEmitter implements GlueEmitter {
private int slot(Type t, int byteOffset, MachineDescription curMachDesc) {
if (t.isInt()) {
- switch ((int) t.getSize(curMachDesc)) {
+ final int tsz = (int) t.getSize(curMachDesc);
+ switch (tsz) {
case 1:
case 2:
case 4:
- case 8: return byteOffset / (int) t.getSize(curMachDesc);
+ case 8: return byteOffset / tsz;
default: throw new RuntimeException("Illegal type");
}
} else if (t.isFloat()) {