diff --git a/rehlds/engine/info.cpp b/rehlds/engine/info.cpp index 82791d1..6680d35 100644 --- a/rehlds/engine/info.cpp +++ b/rehlds/engine/info.cpp @@ -88,6 +88,7 @@ const char* EXT_FUNC Info_ValueForKey(const char *s, const char *lookup) s++; } + size_t keyLen = s - key; const char* value = ++s; // skip separating slash // skip value @@ -96,7 +97,7 @@ const char* EXT_FUNC Info_ValueForKey(const char *s, const char *lookup) size_t valueLen = Q_min(s - value, MAX_KV_LEN - 1); - if (!Q_strncmp(key, lookup, lookupLen)) + if (keyLen == lookupLen && !Q_strncmp(key, lookup, lookupLen)) { char* dest = valueBuf[valueIndex]; Q_memcpy(dest, value, valueLen);