The value of `i' goes from 0 to rows-1, so to test for the last strip we need `i...
[synfig.git] / synfig-core / trunk / src / synfig / target_scanline.cpp
index aeb2869..0272442 100644 (file)
@@ -222,7 +222,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
                                        RendDesc        blockrd = desc;
 
                                        //render the strip at the normal size unless it's the last one...
-                                       if(i == rows)
+                                       if(i == rows-1)
                                        {
                                                if(!lastrowheight) break;
                                                blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);
@@ -357,7 +357,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
                                        RendDesc        blockrd = desc;
 
                                        //render the strip at the normal size unless it's the last one...
-                                       if(i == rows)
+                                       if(i == rows-1)
                                        {
                                                if(!lastrowheight) break;
                                                blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);