aboutsummaryrefslogtreecommitdiffstats
path: root/src/libdisplay/display_measurements.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libdisplay/display_measurements.c')
-rw-r--r--src/libdisplay/display_measurements.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libdisplay/display_measurements.c b/src/libdisplay/display_measurements.c
index d22e4ff..c8329ef 100644
--- a/src/libdisplay/display_measurements.c
+++ b/src/libdisplay/display_measurements.c
@@ -102,6 +102,8 @@ static void print_measurements(int on)
int bar_width, bar_left, bar_right, bar_hold, bar_mark;
get_win_size(&width, &h);
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* no display, if bar graph is less than one character */
bar_width = width - MAX_NAME_LEN - MAX_UNIT_LEN;