From 4b75bcfdd951ea723e7453f5ccbc3e06db039c4f Mon Sep 17 00:00:00 2001 From: Geoffrey Thomas Date: Mon, 29 Jul 2013 23:07:20 -0700 Subject: [PATCH] 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. --- src/terminal/terminaldisplay.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/terminaldisplay.cc b/src/terminal/terminaldisplay.cc index 1c12de1..dfa153a 100644 --- a/src/terminal/terminaldisplay.cc +++ b/src/terminal/terminaldisplay.cc @@ -146,7 +146,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const int lines_scrolled = 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 )) ) { /* found a scroll */ lines_scrolled = row;