Fix stupid, off-by-one, mistakes in assert() expressions.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 27 Jul 2009 19:39:23 +0000 (19:39 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 27 Jul 2009 19:39:23 +0000 (19:39 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@29448 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c
libmpcodecs/vf_ass.c

index e4c06f7..3048a2a 100644 (file)
@@ -319,8 +319,8 @@ static ass_image_t* my_draw_bitmap(unsigned char* bitmap, int bitmap_w, int bitm
 
        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;
index 2068383..8d88e44 100644 (file)
@@ -221,7 +221,7 @@ static void copy_from_image(struct vf_instance_s* vf, int first_row, int last_ro
 
        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;