terminaldisplay: Make a for loop's boundary better match its body

Both f and frame.last_frame must have the same number of rows here, but
since we're iterating over frame.last_frame's rows, make that more
explicit.
This commit is contained in:
Geoffrey Thomas
2013-07-29 23:07:20 -07:00
committed by John Hood
parent f4a93fbf26
commit 4b75bcfdd9
+1 -1
View File
@@ -146,7 +146,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
int lines_scrolled = 0; int lines_scrolled = 0;
int scroll_height = 0; int scroll_height = 0;
for ( int row = 0; row < f.ds.get_height(); row++ ) { for ( int row = 0; row < frame.last_frame.ds.get_height(); row++ ) {
if ( *(f.get_row( 0 )) == *(frame.last_frame.get_row( row )) ) { if ( *(f.get_row( 0 )) == *(frame.last_frame.get_row( row )) ) {
/* found a scroll */ /* found a scroll */
lines_scrolled = row; lines_scrolled = row;