The configuration parser now detects the old p55r2p4 typo and silently corrects it to p55t2p4, ensuring that previous configurations do not break.

This commit is contained in:
OBattler
2017-07-27 15:35:49 +02:00
parent e9720bb444
commit c8b04398b6

View File

@@ -873,7 +873,14 @@ static void loadconfig_machine(void)
p = config_get_string(cat, "model", NULL);
if (p != NULL)
{
model = model_get_model_from_internal_name(p);
/* Detect the old model typo and fix it, so that old configurations don't braek. */
if (strcmp(model, "p55r2p4") == 0)
{
model[3] = 't';
}
}
else
model = 0;
if (model >= model_count())