]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix use of && instead of &
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 12 Aug 2011 21:34:12 +0000 (23:34 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 12 Aug 2011 21:34:12 +0000 (23:34 +0200)
src/servercommand.cpp
src/socket.cpp

index bf174497d52030fbb6f1a6fe7e0e3ca1b4f3c8aa..663693b9a350df310084acb1d77f84f6852058ba 100644 (file)
@@ -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;
index a7d20404707d977f7ea19f952b797768db7ca8b7..ac4871f6145524059f4ed73b1d2de0a1864a7f59 100644 (file)
@@ -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);
 }