2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-16 00:28:20 +03:00

invert condition

This commit is contained in:
asmodai 2017-03-23 00:47:27 +03:00
parent 0f4b380bee
commit 6ee60a1f76

View File

@ -321,7 +321,9 @@ const char *CCommandLine::CheckParm(const char *psz, char **ppszValue) const
return nullptr; return nullptr;
char *pret = strstr(m_pszCmdLine, psz); char *pret = strstr(m_pszCmdLine, psz);
if (pret && ppszValue) { if (!pret || !ppszValue)
return pret;
*ppszValue = nullptr; *ppszValue = nullptr;
// find the next whitespace // find the next whitespace
@ -342,7 +344,7 @@ const char *CCommandLine::CheckParm(const char *psz, char **ppszValue) const
sz[i] = '\0'; sz[i] = '\0';
*ppszValue = sz; *ppszValue = sz;
}
return pret; return pret;
} }