--- freem/src/iniconf.c 2025/04/15 16:49:36 1.10 +++ freem/src/iniconf.c 2025/04/15 18:19:40 1.11 @@ -1,5 +1,5 @@ /* - * $Id: iniconf.c,v 1.10 2025/04/15 16:49:36 snw Exp $ + * $Id: iniconf.c,v 1.11 2025/04/15 18:19:40 snw Exp $ * Function implementations for reading * FreeM configuration files * @@ -25,6 +25,9 @@ * along with FreeM. If not, see . * * $Log: iniconf.c,v $ + * Revision 1.11 2025/04/15 18:19:40 snw + * Further attempts to fix FreeBSD + * * Revision 1.10 2025/04/15 16:49:36 snw * Make use of logprintf throughout codebase * @@ -237,9 +240,9 @@ int read_profile_string(char *file, char snprintf(fullsec, CONF_BUFSIZE - 1, "[%s]%c", section, '\0'); strcpy(cursec, "[]"); - - - fp = fopen(file, "r"); + if ((fp = fopen(file, "r")) == NULL) { + return FALSE; + } while(fgets(line, CONF_BUFSIZE - 1, fp) != NULL) { ++lnum;