From c8a85d54194363020c69cbd6749240f55d9e93b4 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Thu, 6 Apr 2006 19:11:41 +0000 Subject: (svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing) --- console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'console.c') diff --git a/console.c b/console.c index 1cabd2923..3fde04382 100644 --- a/console.c +++ b/console.c @@ -224,7 +224,7 @@ void IConsoleInit(void) memset(_iconsole_buffer, 0, sizeof(_iconsole_buffer)); memset(_iconsole_cbuffer, 0, sizeof(_iconsole_cbuffer)); _iconsole_cmdline.buf = calloc(ICON_CMDLN_SIZE, sizeof(*_iconsole_cmdline.buf)); // create buffer and zero it - _iconsole_cmdline.maxlength = ICON_CMDLN_SIZE - 1; + _iconsole_cmdline.maxlength = ICON_CMDLN_SIZE; IConsolePrintF(13, "OpenTTD Game Console Revision 7 - %s", _openttd_revision); IConsolePrint(12, "------------------------------------"); -- cgit v1.2.3-54-g00ecf