Fixed for color > 16

This commit is contained in:
Markus Gans 2018-06-12 22:53:11 +02:00
parent 61c5fa01cb
commit ff3142c4aa
2 changed files with 9 additions and 5 deletions

View File

@ -532,7 +532,7 @@ short FOptiAttr::vga2ansi (register short color)
color = lookup_table[color];
}
else
else if ( color < 0 )
color = 0;
return color;

View File

@ -301,6 +301,8 @@ int FTerm::keyCorrection (const int& key)
#if defined(__linux__)
key_correction = linux->modifierKeyCorrection(key);
#else
key_correction = key;
#endif
return key_correction;
@ -438,15 +440,17 @@ bool FTerm::setOldFont()
else if ( isLinuxTerm() )
{
retval = linux->loadOldFont(fc::character);
if ( retval )
{
shadow_character = linux->hasShadowCharacter();
half_block_character = linux->hasHalfBlockCharacter();
}
}
#endif
if ( retval )
{
VGAFont = NewFont = false;
shadow_character = linux->hasShadowCharacter();
half_block_character = linux->hasHalfBlockCharacter();
}
return retval;
}