aboutsummaryrefslogtreecommitdiffstats
path: root/src/libdisplay/display_wave.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libdisplay/display_wave.c')
-rw-r--r--src/libdisplay/display_wave.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libdisplay/display_wave.c b/src/libdisplay/display_wave.c
index 261c5bb..8932960 100644
--- a/src/libdisplay/display_wave.c
+++ b/src/libdisplay/display_wave.c
@@ -47,6 +47,8 @@ void display_wave_on(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (wave_on) {
memset(&screen, ' ', sizeof(screen));
@@ -101,6 +103,8 @@ void display_wave(dispwav_t *disp, sample_t *samples, int length, double range)
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 */
center_line = (HEIGHT - 1) >> 1;