[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/kcalc
From:       Alejandro Exojo <suy () badopi ! org>
Date:       2004-08-24 20:28:35
Message-ID: 20040824202835.23BE51D91 () office ! kde ! org
[Download RAW message or body]

CVS commit by suy: 

Klaus Niederkrueger <kniederk@mi.uni-koeln.de>
Fixed BUG 74657.

CCMAIL:74657-done@bugs.kde.org


  M +8 -3      kcalc_core.cpp   1.89


--- kdeutils/kcalc/kcalc_core.cpp  #1.88:1.89
@@ -291,6 +291,11 @@ int isoddint(CALCAMNT input)
 static CALCAMNT ExecPower(CALCAMNT left_op, CALCAMNT right_op)
 {
-        // printf("ExecPowser %g left_op, %g right_op\n",left_op, right_op);
         if (right_op == 0)
+                if (left_op == 0) // 0^0 not defined
+                {
+                        _error = true;          
+                        return 0L;
+                }
+                else
                 return 1L;
 
@@ -303,5 +308,5 @@ static CALCAMNT ExecPower(CALCAMNT left_
         {
                 _error = true;
-                return 0;
+                return 0L;
         }
         else


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic