Reported-and-analyzed-by: Tomek Grabiec <tgrab...@gmail.com> Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com> --- vm/class.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/vm/class.c b/vm/class.c index 757d242..b06ea04 100644 --- a/vm/class.c +++ b/vm/class.c @@ -701,11 +701,19 @@ struct vm_field *vm_class_get_field(const struct vm_class *vmc, struct vm_field *vm_class_get_field_recursive(const struct vm_class *vmc, const char *name, const char *type) { + /* See JVM Spec, 2nd ed., 5.4.3.2 "Field Resolution" */ do { struct vm_field *vmf = vm_class_get_field(vmc, name, type); if (vmf) return vmf; + for (unsigned int i = 0; i < vmc->nr_interfaces; ++i) { + vmf = vm_class_get_field_recursive( + vmc->interfaces[i], name, type); + if (vmf) + return vmf; + } + vmc = vmc->super; } while(vmc); -- 1.6.0.4 ------------------------------------------------------------------------------ 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