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

Truncate node.dab to correct size when initializing any sbbs_t instance

Fixes issue #395
parent 07503ac3
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2990 passed
......@@ -3546,6 +3546,8 @@ bool sbbs_t::init()
break;
}
}
if(chsize(nodefile, (off_t)(cfg.sys_nodes*sizeof(node_t))) != 0)
errormsg(WHERE, ERR_LEN, str, cfg.sys_nodes*sizeof(node_t));
for(i=0; cfg.node_num>0 && i<LOOP_NODEDAB; i++) {
if(lock(nodefile,(cfg.node_num-1)*sizeof(node_t),sizeof(node_t))==0) {
unlock(nodefile,(cfg.node_num-1)*sizeof(node_t),sizeof(node_t));
......
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