about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/gc_menu.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/client/gc_menu.cpp b/src/game/client/gc_menu.cpp
index 446d42a6..f4573b51 100644
--- a/src/game/client/gc_menu.cpp
+++ b/src/game/client/gc_menu.cpp
@@ -210,15 +210,17 @@ int ui_do_edit_box(void *id, const RECT *rect, char *str, int str_size, float fo
 			}
 		}
 
-		if (at_index > len)
-			at_index = len;
-			
 		for(int i = 0; i < inp_num_events(); i++)
 		{
 			INPUT_EVENT e = inp_get_event(i);
 			char c = e.ch;
 			int k = e.key;
 
+			if (at_index > len)
+				at_index = len;
+			
+
+
 			if (!(c >= 0 && c < 32))
 			{
 				if (len < str_size - 1 && at_index < str_size - 1)