Fix FListBox prevListItem()

This commit is contained in:
Markus Gans 2018-10-29 02:59:41 +01:00
parent c96af1d3a2
commit 7a2abc9421
4 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,6 @@
2018-10-29 Markus Gans <guru.mail@muenster.de> 2018-10-29 Markus Gans <guru.mail@muenster.de>
* FTerm is now a data member of FVTerm * FTerm is now a data member of FVTerm
* Fix FListBox prevListItem()
2018-10-26 Markus Gans <guru.mail@muenster.de> 2018-10-26 Markus Gans <guru.mail@muenster.de>
* Building Fix for a negative value check (gcc < 4.8) * Building Fix for a negative value check (gcc < 4.8)

View File

@ -1532,10 +1532,10 @@ void FListBox::prevListItem (int distance)
if ( current == 1 ) if ( current == 1 )
return; return;
current -= std::size_t(distance); if ( current < std::size_t(distance) )
if ( current < 1 )
current = 1; current = 1;
else
current -= std::size_t(distance);
if ( current <= std::size_t(yoffset) ) if ( current <= std::size_t(yoffset) )
{ {

View File

@ -1951,7 +1951,9 @@ void FVTerm::flush_out()
{ {
while ( ! output_buffer->empty() ) while ( ! output_buffer->empty() )
{ {
fterm->Fputchar (output_buffer->front()); if ( fterm )
fterm->Fputchar(output_buffer->front());
output_buffer->pop(); output_buffer->pop();
} }

View File

@ -143,9 +143,9 @@ class FVTerm
// Mutators // Mutators
void setTermXY (int, int); void setTermXY (int, int);
static void hideCursor (bool); void hideCursor (bool);
static void hideCursor(); void hideCursor();
static void showCursor(); void showCursor();
void setPrintCursor (const FPoint&); void setPrintCursor (const FPoint&);
void setPrintCursor (int, int); void setPrintCursor (int, int);
void setColor (short, short); void setColor (short, short);