Преглед на файлове

* fix for web bug #4518 by Salvatore Licciardi

git-svn-id: trunk@2312 -
Tomas Hajny преди 19 години
родител
ревизия
10153d061d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);