From 2e2b93131d2442f1eb77eb0efab9d6cd8b68f2af Mon Sep 17 00:00:00 2001 From: s1lent Date: Mon, 7 May 2018 01:44:37 +0700 Subject: [PATCH] Closes #611 --- rehlds/engine/info.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);