Browse Source

* Fix for bug ID #31735

git-svn-id: trunk@36188 -
michael 8 years ago
parent
commit
a5b0f7f975
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/fcl-passrc/src/pparser.pp

+ 5 - 0
packages/fcl-passrc/src/pparser.pp

@@ -2018,6 +2018,11 @@ begin
             NextToken;
             x:=CreateBinaryExpr(AParent,x, ParseExpIdent(AParent), TokenToExprOp(tkDot));
             end;
+          // for expressions like (PChar(a)+10)[0];
+          if (x<>Nil) and (CurToken=tkSquaredBraceOpen) then
+            begin
+            x:=ParseParams(x,pekArrayParams,False);
+            end;
           end
         else
           begin