Do not write anything when there is no value to save
This commit is contained in:
parent
992c5cbd59
commit
74b506a60b
|
@ -324,7 +324,7 @@ void _save_foreach_section(void const * key, void * value, void * data)
|
|||
char const * var = key;
|
||||
char const * val = value;
|
||||
|
||||
if(fprintf(*fp, "%s=%s\n", var, val) >= 0)
|
||||
if(fprintf(*fp, "%s=%s\n", var, val != NULL ? val : "") >= 0)
|
||||
return;
|
||||
fclose(*fp);
|
||||
*fp = NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user