Skip to content
Snippets Groups Projects
Commit f64c62ec authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Display an error if sbbs.ini can't be opened, don't deref NULL pointer

CID 451182
parent 46acf140
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4010 passed
......@@ -46,10 +46,14 @@ void adjust_last_node()
SAFEPRINTF(prompt, "Update Terminal Server 'LastNode' value to %u", cfg.sys_nodes);
if(last_node < cfg.sys_nodes && uifc.confirm(prompt)) {
fp = iniOpenFile(ini_fname, /* modify */true);
if(fp == NULL)
uifc.msgf("Error %d opening %s", errno, ini_fname);
else {
iniSetUInteger(&ini, section, key, cfg.sys_nodes, NULL);
iniWriteFile(fp, ini);
iniCloseFile(fp);
}
}
iniFreeStringList(ini);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment