diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/q_shared.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index 933df9eb..359fe4dd 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -1332,12 +1332,15 @@ void Info_SetValueForKey( char *s, const char *key, const char *value ) { Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); } - for(; *blacklist; ++blacklist) + if (value) { - if (strchr (key, *blacklist) || strchr (value, *blacklist)) + for(; *blacklist; ++blacklist) { - Com_Printf (S_COLOR_YELLOW "Can't use keys or values with a '%c': %s = %s\n", *blacklist, key, value); - return; + if (strchr (key, *blacklist) || strchr (value, *blacklist)) + { + Com_Printf (S_COLOR_YELLOW "Can't use keys or values with a '%c': %s = %s\n", *blacklist, key, value); + return; + } } } @@ -1373,12 +1376,15 @@ void Info_SetValueForKey_Big( char *s, const char *key, const char *value ) { Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); } - for(; *blacklist; ++blacklist) + if (value) { - if (strchr (key, *blacklist) || strchr (value, *blacklist)) + for(; *blacklist; ++blacklist) { - Com_Printf (S_COLOR_YELLOW "Can't use keys or values with a '%c': %s = %s\n", *blacklist, key, value); - return; + if (strchr (key, *blacklist) || strchr (value, *blacklist)) + { + Com_Printf (S_COLOR_YELLOW "Can't use keys or values with a '%c': %s = %s\n", *blacklist, key, value); + return; + } } } |