Validate the magic number and the version of the settings file. For now, I am not trying to handle backwards compatibility of settings file but it will be possible to do that in the future.

This commit is contained in:
Jeremy Rand 2020-12-30 00:01:58 -05:00
parent 9228f247e5
commit 1cd301548a
1 changed files with 10 additions and 0 deletions

View File

@ -289,6 +289,16 @@ BOOLEAN loadSettings(void)
}
HUnlock(filenameHandle);
if (success)
{
if ((settings.magic[0] != 'B') ||
(settings.magic[1] != 'u') ||
(settings.magic[2] != 'G') ||
(settings.magic[3] != 'S') ||
(settings.version != 0))
success = FALSE;
}
return success;
}