aboutsummaryrefslogtreecommitdiffstats
path: root/src/libdisplay/display_iq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libdisplay/display_iq.c')
-rw-r--r--src/libdisplay/display_iq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libdisplay/display_iq.c b/src/libdisplay/display_iq.c
index 303706a..a16594f 100644
--- a/src/libdisplay/display_iq.c
+++ b/src/libdisplay/display_iq.c
@@ -54,6 +54,8 @@ void display_iq_on(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (iq_on) {
memset(&screen, ' ', sizeof(screen));
@@ -113,6 +115,8 @@ void display_iq(float *samples, int length)
return;
get_win_size(&width, &h);
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* at what line we draw our zero-line and what character we use */
x_center = width >> 1;