Browse Source

* fixed invalid class typecasts in rol/ror handling

git-svn-id: trunk@12703 -
Jonas Maebe 16 years ago
parent
commit
0a14c8824e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/ncginl.pas

+ 4 - 2
compiler/ncginl.pas

@@ -728,7 +728,8 @@ implementation
         op1,op2 : tnode;
       begin
         { one or two parameters? }
-        if assigned(tcallparanode(left).right) then
+        if (left.nodetype=callparan) and
+           assigned(tcallparanode(left).right) then
           begin
             op1:=tcallparanode(tcallparanode(left).right).left;
             op2:=tcallparanode(left).left;
@@ -749,7 +750,8 @@ implementation
         end;
         location_force_reg(current_asmdata.CurrAsmList,location,location.size,false);
 
-        if assigned(tcallparanode(left).right) then
+        if (left.nodetype=callparan) and
+           assigned(tcallparanode(left).right) then
           begin
              secondpass(op2);
              { rotating by a constant directly coded: }