Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mp/src/game/client/clientmode_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ void ClientModeShared::FireGameEvent( IGameEvent *event )
}
}

if ( team == 0 && GetLocalTeam() > 0 )
if ( team == 0 && GetLocalTeam() )
{
bValidTeam = false;
}
Expand Down
8 changes: 4 additions & 4 deletions mp/src/tier1/strtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ int _V_UCS2ToUnicode( const ucs2 *pUCS2, wchar_t *pUnicode, int cubDestSizeInByt
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUnicode;
if ( conv_t > 0 )
if ( conv_t && conv_t != ((iconv_t)-1) )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
iconv_close( conv_t );
Expand Down Expand Up @@ -1451,7 +1451,7 @@ int _V_UnicodeToUCS2( const wchar_t *pUnicode, int cubSrcInBytes, char *pUCS2, i
size_t nMaxUCS2 = cubDestSizeInBytes;
char *pIn = (char*)pUnicode;
char *pOut = pUCS2;
if ( conv_t > 0 )
if ( conv_t && conv_t != ((iconv_t)-1) )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUCS2 );
iconv_close( conv_t );
Expand Down Expand Up @@ -1499,7 +1499,7 @@ int _V_UCS2ToUTF8( const ucs2 *pUCS2, char *pUTF8, int cubDestSizeInBytes )
size_t nMaxUTF8 = cubDestSizeInBytes - 1;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUTF8;
if ( conv_t > 0 )
if ( conv_t && conv_t != ((iconv_t)-1) )
{
const size_t nBytesToWrite = nMaxUTF8;
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
Expand Down Expand Up @@ -1544,7 +1544,7 @@ int _V_UTF8ToUCS2( const char *pUTF8, int cubSrcInBytes, ucs2 *pUCS2, int cubDes
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUTF8;
char *pOut = (char *)pUCS2;
if ( conv_t > 0 )
if ( conv_t && conv_t != ((iconv_t)-1) )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
iconv_close( conv_t );
Expand Down