Commit 9c5205aa authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

ftell() can return negative, deal

CID 33232
parent a03d1d37
......@@ -4198,8 +4198,8 @@ void sbbs_t::catsyslog(int crash)
return;
}
}
length=(long)ftell(logfile_fp);
if(length) {
length = ftell(logfile_fp);
if(length > 0) {
if((buf=(char *)malloc(length))==NULL) {
errormsg(WHERE,ERR_ALLOC,str,length);
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment