diff options
Diffstat (limited to 'src/net/netcomputer.cpp')
-rw-r--r-- | src/net/netcomputer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/net/netcomputer.cpp b/src/net/netcomputer.cpp index f0b677ec..d35779da 100644 --- a/src/net/netcomputer.cpp +++ b/src/net/netcomputer.cpp @@ -92,11 +92,10 @@ operator <<(std::ostream &os, const NetComputer &comp) << ((comp.mPeer->address.host & 0xff000000) >> 24); else // big-endian - // TODO: test this - os << ((comp.mPeer->address.host & 0x000000ff) << 24) << "." - << ((comp.mPeer->address.host & 0x0000ff00) << 16) << "." - << ((comp.mPeer->address.host & 0x00ff0000) << 8) << "." - << ((comp.mPeer->address.host & 0xff000000) << 0); + os << ((comp.mPeer->address.host & 0xff000000) >> 24) << "." + << ((comp.mPeer->address.host & 0x00ff0000) >> 16) << "." + << ((comp.mPeer->address.host & 0x0000ff00) >> 8) << "." + << ((comp.mPeer->address.host & 0x000000ff) >> 0); return os; } |