diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-09-21 06:04:27 -0700 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-09-21 06:04:27 -0700 |
| commit | e96a8c7d86203f463c07d7552190b508ce6c011d (patch) | |
| tree | 59cffaf563b74fe77d570a2e5e62694c617a0e9b /src/netbase.cpp | |
| parent | comment update: it's -> its (diff) | |
| parent | fix signed/unsigned in strprintf and CNetAddr::GetByte() (diff) | |
| download | discoin-e96a8c7d86203f463c07d7552190b508ce6c011d.tar.xz discoin-e96a8c7d86203f463c07d7552190b508ce6c011d.zip | |
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 76a3d25d3..daa8a8d07 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 |