Function was wrong becuase it checked only the last char of method's type string
which leads to invalid type when return type was an array like for:

java/awt/color/ICC_ColorSpace.toCIEXYZ([F)[F

This led to SIGSEGV because of non present monoburg rule, cause
compiler thought the return type is J_FLOAT instead of J_REFERENCE.

Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 include/vm/method.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/vm/method.h b/include/vm/method.h
index b246e64..f17f474 100644
--- a/include/vm/method.h
+++ b/include/vm/method.h
@@ -105,7 +105,7 @@ static inline bool vm_method_is_vm_native(struct vm_method 
*vmm)
 
 static inline enum vm_type method_return_type(struct vm_method *method)
 {
-       char *return_type = method->type + (strlen(method->type) - 1);
+       char *return_type = index(method->type, ')') + 1;
        return str_to_type(return_type);
 }
 
-- 
1.6.0.6


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to