mirror of
https://github.com/jeremysrand/BuGS.git
synced 2025-02-06 23:30:38 +00:00
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:
parent
9228f247e5
commit
1cd301548a
10
BuGS/main.c
10
BuGS/main.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user