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

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)
}
length=(long)filelength(file);
if(length<0) {
if(length < 1) {
fclose(stream);
errormsg(WHERE,ERR_CHK,fpath,length);
return false;
if(length < 0) {
errormsg(WHERE,ERR_CHK,fpath,length);
return false;
}
return true;
}
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