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

Check the return value of chdir() - fixes CID 451056

parent 4ed077e4
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -869,7 +869,10 @@ int main(int argc, char** argv) {
if(fp!=NULL)
fclose(fp);
chdir(bbs_startup.ctrl_dir);
if(chdir(bbs_startup.ctrl_dir) != 0) {
printf("Error %d changing directory to: %s\n", errno, bbs_startup.ctrl_dir);
exit(1);
}
/* Read .cfg files here */
memset(&cfg,0,sizeof(cfg));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment