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>
* FTerm is now a data member of FVTerm
* Fix FListBox prevListItem()
2018-10-26 Markus Gans <guru.mail@muenster.de>
* Building Fix for a negative value check (gcc < 4.8)

View File

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

View File

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

View File

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