summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-04-06 19:11:41 +0000
committerDarkvater <Darkvater@openttd.org>2006-04-06 19:11:41 +0000
commitc8a85d54194363020c69cbd6749240f55d9e93b4 (patch)
tree0c757bee941699bbd6bd6b5291cf2d22688471e2 /console.c
parentdfe10d9db06284825451eab918a02a2c2bb5552f (diff)
downloadopenttd-c8a85d54194363020c69cbd6749240f55d9e93b4.tar.xz
(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)
Diffstat (limited to 'console.c')
-rw-r--r--console.c2
1 files changed, 1 insertions, 1 deletions
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, "------------------------------------");