changeset 29406:e1c1e13cb646

Fix stupid, off-by-one, mistakes in assert() expressions.
author eugeni
date Mon, 27 Jul 2009 19:39:23 +0000
parents 5edbab3df93b
children 9ad97332be79
files libass/ass_render.c libmpcodecs/vf_ass.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Mon Jul 27 16:53:48 2009 +0000
+++ b/libass/ass_render.c	Mon Jul 27 19:39:23 2009 +0000
@@ -319,8 +319,8 @@
 
 	assert(dst_x >= 0);
 	assert(dst_y >= 0);
-	assert(dst_x + bitmap_w < frame_context.width);
-	assert(dst_y + bitmap_h < frame_context.height);
+	assert(dst_x + bitmap_w <= frame_context.width);
+	assert(dst_y + bitmap_h <= frame_context.height);
 
 	img->w = bitmap_w;
 	img->h = bitmap_h;
--- a/libmpcodecs/vf_ass.c	Mon Jul 27 16:53:48 2009 +0000
+++ b/libmpcodecs/vf_ass.c	Mon Jul 27 19:39:23 2009 +0000
@@ -221,7 +221,7 @@
 
 	assert(first_row >= 0);
 	assert(first_row <= last_row);
-	assert(last_row < vf->priv->outh);
+	assert(last_row <= vf->priv->outh);
 
 	for (pl = 1; pl < 3; ++pl) {
 		int dst_stride = vf->priv->outw;