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

filelength() can return -1 on error, deal

Just caught during code review
parent 7550784f
Branches
No related tags found
No related merge requests found
...@@ -3680,7 +3680,7 @@ bool sbbs_t::init() ...@@ -3680,7 +3680,7 @@ bool sbbs_t::init()
return false; return false;
} }
if (filelength(fileno(logfile_fp))) { if (filelength(fileno(logfile_fp)) > 0) {
log(crlf); log(crlf);
time_t ftime = fdate(str); time_t ftime = fdate(str);
safe_snprintf(str, sizeof(str), safe_snprintf(str, sizeof(str),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment