0.10 fix for crashes on OSX 10.6

strnlen is available at build-time but not at runtime, causing a crash.

0.11 drops support for 10.6, so this is not needed in master.
This commit is contained in:
Cory Fields 2015-02-17 16:15:01 -05:00
parent 601327be8c
commit 8752b5c882
3 changed files with 5 additions and 8 deletions

View file

@ -40,7 +40,7 @@ CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSize
std::string CMessageHeader::GetCommand() const
{
return std::string(pchCommand, pchCommand + strnlen(pchCommand, COMMAND_SIZE));
return std::string(pchCommand, pchCommand + strnlen_int(pchCommand, COMMAND_SIZE));
}
bool CMessageHeader::IsValid() const