mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge pull request #1793 from Diapolo/fix_signed_unsigned_strprintf
fix signed/unsigned in strprintf and CNetAddr::GetByte()
This commit is contained in:
@@ -599,7 +599,7 @@ CNetAddr::CNetAddr(const std::string &strIp, bool fAllowLookup)
|
||||
*this = vIP[0];
|
||||
}
|
||||
|
||||
int CNetAddr::GetByte(int n) const
|
||||
unsigned int CNetAddr::GetByte(int n) const
|
||||
{
|
||||
return ip[15-n];
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ std::vector<unsigned char> CService::GetKey() const
|
||||
|
||||
std::string CService::ToStringPort() const
|
||||
{
|
||||
return strprintf("%i", port);
|
||||
return strprintf("%u", port);
|
||||
}
|
||||
|
||||
std::string CService::ToStringIPPort() const
|
||||
|
||||
Reference in New Issue
Block a user