Skip to content
Snippets Groups Projects
Commit 2c82beae authored by rswindell's avatar rswindell
Browse files

Use more sensible values for wordwrap() in putmsg() - we don't need to reserve

space for quote-chars here and we're going to assume the message was originally
formatted for 79 cols.
parent d641a185
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -67,7 +67,7 @@ char sbbs_t::putmsg(const char *buf, long mode)
putcom("\x02\x02");
if(mode&P_WORDWRAP) {
char *wrapped;
if((wrapped=::wordwrap((char*)buf, cols-4, cols-1, WORDWRAP_FLAG_QUOTES)) == NULL)
if((wrapped=::wordwrap((char*)buf, cols-1, 79, WORDWRAP_FLAG_QUOTES)) == NULL)
errormsg(WHERE,ERR_ALLOC,"wordwrap buffer",0);
else
str=wrapped;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment