diff options
author | Haru <haru@dotalux.com> | 2016-01-07 16:43:54 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-24 20:57:53 +0100 |
commit | a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1 (patch) | |
tree | 8f165c5992d1a3c35430d80e2b0a356514d55430 /src/map | |
parent | ebe7347a6e67be6d7a6613089227fcb6647ccf22 (diff) | |
download | hercules-a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1.tar.gz hercules-a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1.tar.bz2 hercules-a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1.tar.xz hercules-a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1.zip |
Changed RFIFOP and WFIFOP to return const void * and void * respectively
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 7152aaa14..1cb925303 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18817,7 +18817,9 @@ int clif_parse(int fd) { if( battle_config.packet_obfuscation == 2 || cmd != RFIFOW(fd, 0) || (sd && sd->parse_cmd_func == clif_parse_cmd_decrypt) ) { // Note: Overriding const qualifier to re-inject the decoded packet ID. - int16 *packet_id = (int16 *)RFIFOP(fd, 0); +#define RFIFOP_mutable(fd, pos) ((void *)(sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos + (pos))) + int16 *packet_id = RFIFOP_mutable(fd, 0); +#undef RFIFOP_mutable *packet_id = cmd; if( sd ) { sd->cryptKey = (( sd->cryptKey * clif->cryptKey[1] ) + clif->cryptKey[2]) & 0xFFFFFFFF; // Update key for the next packet |