about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 23:43:15 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 23:43:15 +0000
commitad9c1b0a22fb451f909d8f12510c560fa8889be2 (patch)
tree7a80be75171d0d756527b6ae5963533c567e688f
parent6224fc776364fb47286c950a2aa7c568d3dc0b17 (diff)
downloadzcatch-ad9c1b0a22fb451f909d8f12510c560fa8889be2.tar.gz
zcatch-ad9c1b0a22fb451f909d8f12510c560fa8889be2.zip
fixed text input box bug
-rw-r--r--src/game/client/components/menus.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp
index 311e70cc..7a639429 100644
--- a/src/game/client/components/menus.cpp
+++ b/src/game/client/components/menus.cpp
@@ -212,7 +212,7 @@ int MENUS::ui_do_edit_box(void *id, const RECT *rect, char *str, int str_size, f
 	if(ui_last_active_item() == id)
 	{
 		int len = strlen(str);
-
+			
 		if (inside && ui_mouse_button(0))
 		{
 			int mx_rel = (int)(ui_mouse_x() - rect->x);
@@ -232,6 +232,7 @@ int MENUS::ui_do_edit_box(void *id, const RECT *rect, char *str, int str_size, f
 
 		for(int i = 0; i < num_inputevents; i++)
 		{
+			len = strlen(str);
 			INPUT_EVENT e = inputevents[i];
 			char c = e.ch;
 			int k = e.key;