[gnome-calculator/gnome-3-10] Fix crash pressing super/subscript buttons when equation has trailing whitespace



commit 9829c6137093a9576b25b1cdc9109e33b4dbb86f
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri May 9 15:04:18 2014 +1200

    Fix crash pressing super/subscript buttons when equation has trailing whitespace

 src/math-buttons.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/math-buttons.vala b/src/math-buttons.vala
index 755334e..c1a3c3b 100644
--- a/src/math-buttons.vala
+++ b/src/math-buttons.vala
@@ -962,9 +962,12 @@ public class MathButtons : Gtk.Box
         while (start.backward_char ())
         {
             if (!start.get_char ().isspace ())
+            {
+                start.forward_char ();
                 break;
-            equation.delete (ref start, ref end);
+            }
         }
+        equation.delete (ref start, ref end);
     }
 
     private void set_superscript_cb (Gtk.Button widget)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]