From fe0708c09ad1288fe108fb7a7cf0c9e08720bd51 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 5 Nov 2007 08:52:03 -0700 Subject: [PATCH] check for all non-virtual methods in invoke(), not just static ones --- src/interpret.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpret.cpp b/src/interpret.cpp index 02c59fb00c..9438b7a583 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -2753,9 +2753,7 @@ invoke(Thread* t, object method) object class_; PROTECT(t, class_); - if (methodFlags(t, method) & ACC_STATIC) { - class_ = methodClass(t, method); - } else { + if (methodVirtual(t, method)) { unsigned parameterFootprint = methodParameterFootprint(t, method); class_ = objectClass(t, peekObject(t, t->sp - parameterFootprint)); @@ -2768,6 +2766,8 @@ invoke(Thread* t, object method) } else { method = findMethod(t, method, class_); } + } else { + class_ = methodClass(t, method); } initClass(t, class_);