fix thinko in invokeNative2

This commit is contained in:
Joel Dice 2008-01-03 12:49:07 -07:00
parent 651a27f73e
commit 2d6d69a573

View File

@ -3590,11 +3590,10 @@ invokeNative2(MyThread* t, object method)
PROTECT(t, class_); PROTECT(t, class_);
unsigned footprint = methodParameterFootprint(t, method) + 1; unsigned footprint = methodParameterFootprint(t, method) + 1;
unsigned count = methodParameterCount(t, method) + 1;
if (methodFlags(t, method) & ACC_STATIC) { if (methodFlags(t, method) & ACC_STATIC) {
++ footprint; ++ footprint;
++ count;
} }
unsigned count = methodParameterCount(t, method) + 2;
uintptr_t args[footprint]; uintptr_t args[footprint];
unsigned argOffset = 0; unsigned argOffset = 0;
@ -3667,7 +3666,7 @@ invokeNative2(MyThread* t, object method)
(function, (function,
args, args,
types, types,
count + 1, count,
footprint * BytesPerWord, footprint * BytesPerWord,
returnType); returnType);
} }