Explorar o código

* when determining whether taking the address of an array element is
valid, check for the array's actual lower bound instead of always for
zero

git-svn-id: branches/jvmbackend@18822 -

Jonas Maebe %!s(int64=14) %!d(string=hai) anos
pai
achega
f40c893084
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      compiler/jvm/njvmmem.pas

+ 1 - 1
compiler/jvm/njvmmem.pas

@@ -141,7 +141,7 @@ implementation
           (left.nodetype=vecn) and
           (tvecnode(left).left.resultdef.typ=arraydef) and
           (tvecnode(left).right.nodetype=ordconstn) and
-          (tordconstnode(tvecnode(left).right).value=0);
+          (tordconstnode(tvecnode(left).right).value=tarraydef(tvecnode(left).left.resultdef).lowrange);
       end;