Browse Source

* Fix code to avoid use of unitialized rv local variable in tmoddivnode.simplify method

git-svn-id: trunk@19571 -
pierre 13 years ago
parent
commit
da62249d6b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/nmat.pas

+ 3 - 2
compiler/nmat.pas

@@ -117,7 +117,8 @@ implementation
 
         if is_constintnode(right) then
           begin
-            if tordconstnode(right).value = 1 then
+            rv:=tordconstnode(right).value;
+            if rv = 1 then
               begin
                 case nodetype of
                   modn:
@@ -127,7 +128,7 @@ implementation
                 end;
                 exit;
               end;
-            if tordconstnode(right).value = 0 then
+            if rv = 0 then
               begin
                 Message(parser_e_division_by_zero);
                 { recover }