patch:
diff -Nur -x '*.orig' -x '*~' gcalctool-5.28.2/src/mp.c 
gcalctool-5.28.2.new/src/mp.c
--- gcalctool-5.28.2/src/mp.c   2009-12-16 10:24:32.000000000 +1100
+++ gcalctool-5.28.2.new/src/mp.c       2010-02-22 09:36:14.763690384 +1100
@@ -1705,8 +1705,10 @@
 void
 mp_sqrt(const MPNumber *x, MPNumber *z)
 {
-    if (x->sign < 0)
+    if (x->sign < 0) {
         mperr("*** X NEGATIVE IN CALL TO SUBROUTINE MP_SQRT ***");
+        mp_set_from_integer(0, z);
+    }
     else if (x->sign == 0)
         mp_set_from_integer(0, z);
     else {


** Changed in: gcalctool (Ubuntu)
       Status: Incomplete => Triaged

** Changed in: gcalctool (Ubuntu)
       Status: Triaged => Fix Committed

** Changed in: gcalctool (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
Taking the square root of the square root of negative one freezes
https://bugs.launchpad.net/bugs/515280
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to