From 8fd8045550facb7c66501ad34be089f8cb2d5448 Mon Sep 17 00:00:00 2001 From: Tomas 'ZeXx86' Jedrzejek Date: Sat, 18 Apr 2009 22:27:31 +0200 Subject: Bugfix of chat character limiter Cleanup in settingKeys.c file --- src/client/chat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/chat.c b/src/client/chat.c index ca98389..019445f 100644 --- a/src/client/chat.c +++ b/src/client/chat.c @@ -127,16 +127,16 @@ static void processMessageKey(SDL_keysym keysym) len = strlen(line); font_text_size(line, &w, &h); - if (w > CHAT_SIZE_X - 40) { - return; - } - /* processing of backspace */ if (keysym.sym == SDLK_BACKSPACE && len > 0) { line[len - 1] = '\0'; return; } + /* end of line */ + if (w > CHAT_SIZE_X - 20) + return; + /* processing of printable chars but not letters */ if ((keysym.sym >= SDLK_SPACE && keysym.sym <= SDLK_AT) || (keysym.sym >= SDLK_LEFTBRACKET && keysym.sym <= SDLK_BACKQUOTE)) { -- cgit v1.2.3