From 72e4c8f5233608924ccd58d178593eb7e69bed17 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 12 Aug 2011 23:34:12 +0200 Subject: [PATCH] Fix use of && instead of & --- src/servercommand.cpp | 2 +- src/socket.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/servercommand.cpp b/src/servercommand.cpp index bf174497..663693b9 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<>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); } -- 2.30.2