diff options
author | Darkvater <darkvater@openttd.org> | 2006-04-06 19:11:41 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-04-06 19:11:41 +0000 |
commit | b68b9b149a5a0c969de94f192420d953c14b1109 (patch) | |
tree | 0c757bee941699bbd6bd6b5291cf2d22688471e2 /console.c | |
parent | 558ecb16317bccb53e534f561c659844bcd89df5 (diff) | |
download | openttd-b68b9b149a5a0c969de94f192420d953c14b1109.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, "------------------------------------"); |