diff --git a/src/sbbs3/pack_rep.cpp b/src/sbbs3/pack_rep.cpp index 95ae11ac579363cf4c8ea41c37e5fd368fce8cbe..0e31e69f0f30fc222b063129e3cae2bf26f8d5a8 100644 --- a/src/sbbs3/pack_rep.cpp +++ b/src/sbbs3/pack_rep.cpp @@ -71,8 +71,8 @@ bool sbbs_t::pack_rep(uint hubnum) /* Create SYSID.MSG, write header and leave open */ /*************************************************/ sprintf(str,"%s%s.msg",cfg.temp_dir,cfg.qhub[hubnum]->id); - if((rep=fnopen(&file,str,O_CREAT|O_WRONLY))==NULL) { - errormsg(WHERE,ERR_OPEN,str,O_CREAT|O_WRONLY); + if((rep=fnopen(&file,str,O_CREAT|O_WRONLY|O_TRUNC))==NULL) { + errormsg(WHERE,ERR_OPEN,str,O_CREAT|O_WRONLY|O_TRUNC); return(false); } if(filelength(file)<1) { /* New REP packet */ sprintf(str,"%-128s",cfg.qhub[hubnum]->id); /* So write header */