From 393114afad90b2d9e1f093746b8eae9817220366 Mon Sep 17 00:00:00 2001 From: Andrew Binstock <920630+platypusguy@users.noreply.github.com> Date: Tue, 15 Aug 2023 23:04:10 -0700 Subject: [PATCH] JACOBIN-336 Corrected check for null pointer in IFNONNULL --- src/jvm/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jvm/run.go b/src/jvm/run.go index 55d73c14..11d11d30 100644 --- a/src/jvm/run.go +++ b/src/jvm/run.go @@ -2241,7 +2241,7 @@ func runFrame(fs *list.List) error { value := pop(f) if value != nil { // it's not nil, but is it a null pointer? checkForPtr := value.(*object.Object) - if checkForPtr == nil { // it really is a null pointer, so just move on + if checkForPtr == nil || checkForPtr == object.Null { // it really is a null pointer, so just move on f.PC += 2 } else { // no, it's not nil nor a null pointer--so do the jump jumpTo := (int16(f.Meth[f.PC+1]) * 256) + int16(f.Meth[f.PC+2])