summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-04-15 19:52:58 +0000
committerDarkvater <darkvater@openttd.org>2006-04-15 19:52:58 +0000
commitf69fcf400e242d119498c0a4b99d7ec6d69d07b0 (patch)
treee60c28d4ae6a3a782fb8d192ce748b2d3f61cc51
parentbe4293098ab2184c904f1aa2db44ae180efa9937 (diff)
downloadopenttd-f69fcf400e242d119498c0a4b99d7ec6d69d07b0.tar.xz
(svn r4434) - Codechange: use str_validate for the console as well instead of custom function doing the same.
-rw-r--r--console.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/console.c b/console.c
index 3fde04382..7304bfdcf 100644
--- a/console.c
+++ b/console.c
@@ -395,11 +395,7 @@ void IConsolePrint(uint16 color_code, const char* string)
memmove(&_iconsole_buffer[0], &_iconsole_buffer[1], sizeof(_iconsole_buffer[0]) * ICON_BUFFER);
_iconsole_buffer[ICON_BUFFER] = strdup(string);
- { // filter out unprintable characters
- char *i;
- for (i = _iconsole_buffer[ICON_BUFFER]; *i != '\0'; i++)
- if (!IsValidAsciiChar((byte)*i)) *i = ' ';
- }
+ str_validate(_iconsole_buffer[ICON_BUFFER]);
memmove(&_iconsole_cbuffer[0], &_iconsole_cbuffer[1], sizeof(_iconsole_cbuffer[0]) * ICON_BUFFER);
_iconsole_cbuffer[ICON_BUFFER] = color_code;