Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tawindow.py b/tawindow.py
index 5dcf164..c9442f3 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -663,10 +663,12 @@ def unselect(tw):
if tw.selected_block.label in ['-', '.', '-.']:
setlabel(tw.selected_block,'0')
- # put an upperbound on numbers
+ # put an upper and lower bound on numbers to prevent OverflowError
i = int(tw.selected_block.label)
if i > 1000000:
setlabel(tw.selected_block,'0')
+ elif i < -1000000:
+ setlabel(tw.selected_block,'0')
hide(tw.select_mask)
hide(tw.select_mask_string)