summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/chat.c8
1 files changed, 4 insertions, 4 deletions
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)) {