1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Prevent bad values with the language to restore

This commit is contained in:
Mathieu Schroeter 2017-10-23 19:30:59 +02:00
parent 05a8c4469a
commit a17a7e1dda

View File

@ -4585,7 +4585,11 @@ CEvent::ReadInfo ()
m_pSound->SetMidiVolume (info.midiVolume);
if ((info.majRev == 1 && info.minRev >= 1) || info.majRev >= 2)
{
if (info.language >= static_cast<int> (Language::end))
info.language = 0;
this->SetLanguage (static_cast<Language> (info.language));
}
fclose (file);
return true;