Skip to content

Commit 3b624da

Browse files
committed
Fix compile error in CStringMapReader::ReadString
1 parent e6c6edb commit 3b624da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Shared/sdk/CStringMap.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class CStringMapReader : public std::map<SString, V>
1818
void ReadString(const SString& strKeyName, SString& strOutValue, const char* szDefaultValue)
1919
{
2020
V* pstrValue = MapFind(*this, strKeyName);
21-
strOutValue = pstrValue ? *pstrValue : szDefaultValue;
21+
22+
if (pstrValue)
23+
strOutValue = *pstrValue;
24+
else
25+
strOutValue = szDefaultValue;
2226
}
2327

2428
template <typename T, typename U>

0 commit comments

Comments
 (0)