summaryrefslogtreecommitdiff
path: root/src/vcr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcr.c')
-rw-r--r--src/vcr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vcr.c b/src/vcr.c
index 4366421..d90243d 100644
--- a/src/vcr.c
+++ b/src/vcr.c
@@ -1194,6 +1194,10 @@ void vcr_draw_bar(vcr_t *vcr, vcr_layer_t layer, int row, double t, int min_heig
if (height < min_height)
height = min_height;
+ /* clamp the height to not potentially overflow */
+ if (height > (VCR_ROW_HEIGHT - 1))
+ height = (VCR_ROW_HEIGHT - 1);
+
switch (vcr->backend->type) {
#ifdef USE_XLIB
case VCR_BACKEND_TYPE_XLIB: {
© All Rights Reserved