From a79ab6c3d11c7d6fcd1f04400f50b93f72e570e1 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Jan 2016 16:43:54 +0100 Subject: Changed RFIFOP and WFIFOP to return const void * and void * respectively Signed-off-by: Haru --- src/map/clif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map/clif.c') 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 -- cgit v1.2.3-60-g2f50