about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-22 16:17:59 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-22 16:17:59 +0000
commit271f1ae44af3251bd9d4dd5585ae7078a5fe7993 (patch)
treec7e620a342b077241297502c3c2cf51060d1c003 /src/game/client
parent4e3c341dec514ee4ce06c7ab3503113ff4d3e4d5 (diff)
downloadzcatch-271f1ae44af3251bd9d4dd5585ae7078a5fe7993.tar.gz
zcatch-271f1ae44af3251bd9d4dd5585ae7078a5fe7993.zip
fixed error with broadcast
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/gc_hooks.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp
index 287d8d21..a4ac0e74 100644
--- a/src/game/client/gc_hooks.cpp
+++ b/src/game/client/gc_hooks.cpp
@@ -563,8 +563,16 @@ extern "C" void modc_message(int msgtype)
 		}
 	
 		len = min(len, (int)sizeof(broadcast_text));
-		str_copy(broadcast_text, msg->message, len);
-		broadcast_time = time_get()+time_freq()*10;
+		if(len)
+		{
+			str_copy(broadcast_text, msg->message, len);
+			broadcast_time = time_get()+time_freq()*10;
+		}
+		else
+		{
+			broadcast_text[0] = 0;
+			broadcast_time = 0;
+		}
 	}
 	else if(msgtype == NETMSGTYPE_SV_SETINFO)
 	{