summaryrefslogtreecommitdiff
path: root/source/q_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/q_shared.c')
-rw-r--r--source/q_shared.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/q_shared.c b/source/q_shared.c
index 3077913..48f7e1e 100644
--- a/source/q_shared.c
+++ b/source/q_shared.c
@@ -1964,7 +1964,6 @@ Info_RemoveKey
void Info_RemoveKey( char *s, const char *key ) {
char *start;
char pkey[MAX_INFO_STRING];
- char value[MAX_INFO_STRING];
char *o;
if( strchr( key, '\\' ) ) {
@@ -1984,17 +1983,18 @@ void Info_RemoveKey( char *s, const char *key ) {
*o = 0;
s++;
- o = value;
while( *s != '\\' && *s ) {
- if( !*s )
- return;
- *o++ = *s++;
+ s++;
}
- *o = 0;
if( !strcmp( key, pkey ) ) {
- strcpy( start, s ); // remove this part
- return;
+ o = start; // remove this part
+ while( *s ) {
+ *o++ = *s++;
+ }
+ *o = 0;
+ s = start;
+ continue; // search for duplicates
}
if( !*s )