Code to cope with errors from an incomplete preferences file

This commit is contained in:
nigel 2004-01-27 11:20:24 +00:00
parent c9af62f191
commit 35d3ea9991

View File

@ -102,7 +102,10 @@ bool
parse_screen_prefs(const char *mode_str)
{
if ( ! mode_str )
return false;
{
// No screen pref was found. Supply a default:
mode_str = "win/512/384";
}
if (sscanf(mode_str, "win/%hd/%hd/%hd",
&init_width, &init_height, &init_depth) == 3)