tFix for server segfault on invalid short network messages - vaccinewars - be a… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit a07433d8ade4583c9d530bb38fe4210086415914 | |
parent 8ea0913a8631d7cdbadcad6d76fc758e16f2c76a | |
Author: Ben Webb <[email protected]> | |
Date: Tue, 10 Apr 2001 13:25:44 +0000 | |
Fix for server segfault on invalid short network messages | |
Diffstat: | |
M src/message.c | 4 +--- | |
1 file changed, 1 insertion(+), 3 deletions(-) | |
--- | |
diff --git a/src/message.c b/src/message.c | |
t@@ -698,9 +698,7 @@ gchar *GetNextWord(gchar **Data,gchar *Default) { | |
if (*Data==NULL || **Data=='\0') return Default; | |
Word=*Data; | |
while (**Data!='\0' && **Data!='^') (*Data)++; | |
- if (**Data=='\0') { | |
- *Data=NULL; | |
- } else { | |
+ if (**Data!='\0') { | |
**Data='\0'; (*Data)++; | |
} | |
return Word; |