summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-05-17 02:35:40 +0200
committerHaru <haru@dotalux.com>2015-05-17 02:35:53 +0200
commitb9a8ad743a78d5053482cb4d47d2795252ec9095 (patch)
tree40d10510054cd3dd254c366ccbe550817cb3e4ec /src/map/intif.c
parentb2b597c523f19fbacaf052117d47f254483c6e0e (diff)
downloadhercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.gz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.bz2
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.xz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.zip
Fixed some issues detected by coverity scan
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 50857baa8..7a860049a 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -130,7 +130,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name)
// GM Send a message
int intif_broadcast(const char* mes, size_t len, int type)
{
- int lp = (type|BC_COLOR_MASK) ? 4 : 0;
+ int lp = (type&BC_COLOR_MASK) ? 4 : 0;
// Send to the local players
clif->broadcast(NULL, mes, len, type, ALL_CLIENT);
@@ -149,9 +149,9 @@ int intif_broadcast(const char* mes, size_t len, int type)
WFIFOW(inter_fd,10) = 0; // fontSize not used with standard broadcast
WFIFOW(inter_fd,12) = 0; // fontAlign not used with standard broadcast
WFIFOW(inter_fd,14) = 0; // fontY not used with standard broadcast
- if( type|BC_BLUE )
+ if (type&BC_BLUE)
WFIFOL(inter_fd,16) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow.
- else if( type|BC_WOE )
+ else if (type&BC_WOE)
WFIFOL(inter_fd,16) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'.
memcpy(WFIFOP(inter_fd,16 + lp), mes, len);
WFIFOSET(inter_fd, WFIFOW(inter_fd,2));