Skip to content
Snippets Groups Projects
Commit a369940c authored by rswindell's avatar rswindell
Browse files

All iniRead functions return default value if passed a NULL FILE pointer.

parent 60973052
Branches
Tags
No related merge requests found
...@@ -89,6 +89,9 @@ static char* get_value(FILE* fp, const char* section, const char* key) ...@@ -89,6 +89,9 @@ static char* get_value(FILE* fp, const char* section, const char* key)
char str[MAX_LINE_LEN]; char str[MAX_LINE_LEN];
static char value[MAX_VALUE_LEN]; static char value[MAX_VALUE_LEN];
if(fp==NULL)
return(NULL);
if(!find_section(fp,section)) if(!find_section(fp,section))
return(NULL); return(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment