diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-12 23:34:12 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-12 23:34:12 +0200 |
commit | 72e4c8f5233608924ccd58d178593eb7e69bed17 (patch) | |
tree | 8275477f2b34d3dd5406c6d1a02726d25394dd41 /src | |
parent | 835d2e4b5f92a5f9891fce8f958a4985cc53f1cf (diff) | |
download | minetest-72e4c8f5233608924ccd58d178593eb7e69bed17.tar.gz minetest-72e4c8f5233608924ccd58d178593eb7e69bed17.tar.bz2 minetest-72e4c8f5233608924ccd58d178593eb7e69bed17.zip |
Fix use of && instead of &
Diffstat (limited to 'src')
-rw-r--r-- | src/servercommand.cpp | 2 | ||||
-rw-r--r-- | src/socket.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/servercommand.cpp b/src/servercommand.cpp index bf174497d..663693b9a 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -185,7 +185,7 @@ void cmd_teleport(std::wostringstream &os, void cmd_banunban(std::wostringstream &os, ServerCommandContext *ctx) { - if((ctx->privs && PRIV_BAN) == 0) + if((ctx->privs & PRIV_BAN) == 0) { os<<L"-!- You don't have permission to do that"; return; diff --git a/src/socket.cpp b/src/socket.cpp index a7d204047..ac4871f61 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -100,10 +100,10 @@ void Address::Resolve(const char *name) std::string Address::serializeString() { unsigned int a, b, c, d; - a = (m_address && 0xFF000000)>>24; - b = (m_address && 0x00FF0000)>>16; - c = (m_address && 0x0000FF00)>>8; - d = (m_address && 0x000000FF); + a = (m_address & 0xFF000000)>>24; + b = (m_address & 0x00FF0000)>>16; + c = (m_address & 0x0000FF00)>>8; + d = (m_address & 0x000000FF); return itos(a)+"."+itos(b)+"."+itos(c)+"."+itos(d); } |