diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-09-21 06:04:27 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-09-21 06:04:27 -0700 |
commit | e96a8c7d86203f463c07d7552190b508ce6c011d (patch) | |
tree | 59cffaf563b74fe77d570a2e5e62694c617a0e9b /src/netbase.cpp | |
parent | 3ccbaa56f42d2c6fcb424b641ec84a138f0ee9bc (diff) | |
parent | 463a1cab43fda24f89f71fffc876756dc1bc155a (diff) |
Merge pull request #1793 from Diapolo/fix_signed_unsigned_strprintf
fix signed/unsigned in strprintf and CNetAddr::GetByte()
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 76a3d25d3a..daa8a8d07e 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -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 |