summaryrefslogtreecommitdiff
path: root/src/map/intif.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-01-09 00:18:53 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-01-09 00:43:27 -0800
commitf0a87e4f7f5377498960429e96be5dff183c8326 (patch)
tree2661728f73f3c163e971d94cd123ef6e378264aa /src/map/intif.cpp
parentf2fd4885c2a906414e0f36acf95d252e5a9d5805 (diff)
downloadtmwa-f0a87e4f7f5377498960429e96be5dff183c8326.tar.gz
tmwa-f0a87e4f7f5377498960429e96be5dff183c8326.tar.bz2
tmwa-f0a87e4f7f5377498960429e96be5dff183c8326.tar.xz
tmwa-f0a87e4f7f5377498960429e96be5dff183c8326.zip
Make incoming packets read-only
Diffstat (limited to 'src/map/intif.cpp')
-rw-r--r--src/map/intif.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/intif.cpp b/src/map/intif.cpp
index bb27643..9d44200 100644
--- a/src/map/intif.cpp
+++ b/src/map/intif.cpp
@@ -288,8 +288,10 @@ int intif_parse_WisMessage(int fd)
if (battle_config.etc_log)
PRINTF("intif_parse_wismessage: id: %d, from: %s, to: %s, message: '%s'\n",
- RFIFOL(fd, 4), RFIFOP(fd, 8), RFIFOP(fd, 32), RFIFOP(fd,
- 56));
+ RFIFOL(fd, 4),
+ static_cast<const char *>(RFIFOP(fd, 8)),
+ static_cast<const char *>(RFIFOP(fd, 32)),
+ static_cast<const char *>(RFIFOP(fd, 56)));
sd = map_nick2sd((const char *)RFIFOP(fd, 32)); // Searching destination player
if (sd != NULL && strcmp(sd->status.name, (const char *)RFIFOP(fd, 32)) == 0)
{ // exactly same name (inter-server have checked the name before)
@@ -328,7 +330,9 @@ int intif_parse_WisEnd(int fd)
struct map_session_data *sd;
if (battle_config.etc_log)
- PRINTF("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd, 2), RFIFOB(fd, 26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ PRINTF("intif_parse_wisend: player: %s, flag: %d\n",
+ static_cast<const char *>(RFIFOP(fd, 2)), RFIFOB(fd, 26));
sd = map_nick2sd((const char *)RFIFOP(fd, 2));
if (sd != NULL)
clif_wis_end(sd->fd, RFIFOB(fd, 26));
@@ -484,7 +488,7 @@ int intif_parse_PartyInfo(int fd)
RFIFOL(fd, 4), RFIFOW(fd, 2),
sizeof(struct party) + 4);
}
- party_recv_info((struct party *) RFIFOP(fd, 4));
+ party_recv_info(static_cast<const struct party *>(RFIFOP(fd, 4)));
return 0;
}