2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00
This commit is contained in:
s1lent 2018-05-07 01:44:37 +07:00
parent 2fa7655370
commit 2e2b93131d
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -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);