aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/displaywindow.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c
index d6f47ac5..020be60c 100644
--- a/src/displaywindow.c
+++ b/src/displaywindow.c
@@ -733,10 +733,18 @@ static void numbers_update(DisplayWindow *dw)
}
if ( (x>0) && (y>0) && valid ) {
- if ( log(val)/log(10) < 5 ) {
- snprintf(s, 31, "%.0f", val);
+ if ( val > 0 ) {
+ if ( log(val)/log(10) < 5 ) {
+ snprintf(s, 31, "%.0f", val);
+ } else {
+ snprintf(s, 31, "HUGE");
+ }
} else {
- snprintf(s, 31, "HUGE");
+ if ( log(-val)/log(10) < 4 ) {
+ snprintf(s, 31, "%.0f", val);
+ } else {
+ snprintf(s, 31, "-HUGE");
+ }
}
} else {
strcpy(s, "--");