diff options
author | Darkvater <Darkvater@openttd.org> | 2006-04-15 19:52:58 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-04-15 19:52:58 +0000 |
commit | 0b2399fec2118d58d739f470e834ac9336e3e6f6 (patch) | |
tree | e60c28d4ae6a3a782fb8d192ce748b2d3f61cc51 | |
parent | 613104ba005d0f5da1641a46d3b601969cb8721c (diff) | |
download | openttd-0b2399fec2118d58d739f470e834ac9336e3e6f6.tar.xz |
(svn r4434) - Codechange: use str_validate for the console as well instead of custom function doing the same.
-rw-r--r-- | console.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |