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 0b6132f9 authored by rswindell's avatar rswindell

Fix bug reported by Nelgin in printfile(), when called with-OUT the P_OPENCLOSE

mode flag, an EOF @-code would not stop the output since it calls putmsg()
for *each* line of the file and was not checking the return value of putmsg()
for an abnormal/early-termination indicator.
parent 2b55a49f
......@@ -138,7 +138,8 @@ bool sbbs_t::printfile(const char* fname, long mode, long org_cols)
break;
if((mode&P_UTF8) && !term_supports(UTF8))
utf8_normalize_str(buf);
putmsg(buf, mode|P_SAVEATR, org_cols);
if(putmsg(buf, mode|P_SAVEATR, org_cols) != '\0') // early-EOF?
break;
}
free(buf);
fclose(stream);
......
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