mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-29 08:05:50 +03:00
Closes #611
This commit is contained in:
parent
2fa7655370
commit
2e2b93131d
@ -88,6 +88,7 @@ const char* EXT_FUNC Info_ValueForKey(const char *s, const char *lookup)
|
|||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t keyLen = s - key;
|
||||||
const char* value = ++s; // skip separating slash
|
const char* value = ++s; // skip separating slash
|
||||||
|
|
||||||
// skip value
|
// 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);
|
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];
|
char* dest = valueBuf[valueIndex];
|
||||||
Q_memcpy(dest, value, valueLen);
|
Q_memcpy(dest, value, valueLen);
|
||||||
|
Loading…
Reference in New Issue
Block a user