X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodGen.java;fp=src%2Forg%2Fibex%2Fclassgen%2FMethodGen.java;h=ef40595c82287c4be889e97590ec72c3023c970f;hp=50ff3af0dac1821327c8103ea81a400439b15916;hb=ddf408851103280fd02c37c7afd806a94b2a3ec3;hpb=d54f8660ded621af4065b8907255c162df0f6eb0 diff --git a/src/org/ibex/classgen/MethodGen.java b/src/org/ibex/classgen/MethodGen.java index 50ff3af..ef40595 100644 --- a/src/org/ibex/classgen/MethodGen.java +++ b/src/org/ibex/classgen/MethodGen.java @@ -842,7 +842,9 @@ public class MethodGen extends Type.Class.Method.Body { } else if (argLength == 7) { throw new Error("should never happen - variable length instruction not explicitly handled"); } else { - int iarg = ((Integer)arg).intValue(); + int iarg = (arg instanceof Type.Primitive) + ? ((Type.Primitive)arg).toArraySpec() + : ((Integer)arg).intValue(); if (argLength == 1) { if ((opdata & OP_UNSIGNED_FLAG) != 0 ? iarg >= 256 : (iarg < -128 || iarg >= 128)) throw new ClassFile.Exn("overflow of s/u1 option");