Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 93f4f04b authored by rswindell's avatar rswindell
Browse files

Work-around observed infinite loop trying to print a 0-byte file where

feof() was returning 0 and fgets() never returned NULL. Weird.
parent 8a3d8d2c
...@@ -96,10 +96,13 @@ bool sbbs_t::printfile(const char* fname, long mode, long org_cols) ...@@ -96,10 +96,13 @@ bool sbbs_t::printfile(const char* fname, long mode, long org_cols)
} }
length=(long)filelength(file); length=(long)filelength(file);
if(length<0) { if(length < 1) {
fclose(stream); fclose(stream);
errormsg(WHERE,ERR_CHK,fpath,length); if(length < 0) {
return false; errormsg(WHERE,ERR_CHK,fpath,length);
return false;
}
return true;
} }
if(mode&P_OPENCLOSE) { if(mode&P_OPENCLOSE) {
......
Markdown is supported
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