head 1.1; access; symbols; locks; strict; comment @// @; 1.1 date 2026.10.16.17.53.01; author ktnb; state Exp; branches; next ; commitid 5HyEBr7rCzuddJZG; desc @@ 1.1 log @gnuchess: fixed endless loop when building games/gnuchess-book @ text @$NetBSD$ Don't die when file doesn't exist --- src/adapter/main.cpp.orig 2026-10-16 17:24:47.983164281 +0000 +++ src/adapter/main.cpp @@@@ -167,8 +167,9 @@@@ static void parse_option() { file_name = option_get_string("OptionFile"); - file = fopen(file_name,"r"); - if (file == NULL) my_fatal( "Can't open file \"%s\": %s - using defaults\n",file_name,strerror(errno)); + file = file_name ? fopen(file_name,"r") : NULL;; + if (file == NULL && file_name != NULL) + my_log( "Can't open file \"%s\": %s - using defaults\n",file_name,strerror(errno)); // PolyGlot options (assumed first) @