Browse Source

* fix for web bug #4518 by Salvatore Licciardi

git-svn-id: trunk@2312 -
Tomas Hajny 19 years ago
parent
commit
10153d061d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ide/fpcalc.pas

+ 1 - 1
ide/fpcalc.pas

@@ -371,7 +371,7 @@ begin
                   '*', '/': R := R / 100;
                 end;
               case _Operator of
-                '^': SetDisplay(Power(Operand,R),false);
+                '^': if (Operand = 0)and(R <= 0) then Error else SetDisplay(Power(Operand,R),false);
                 '+': SetDisplay(Operand + R,false);
                 '-': SetDisplay(Operand - R,false);
                 '*': SetDisplay(Operand * R,false);