diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-11 19:56:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-10 19:09:32 +0300 |
commit | 7a1f3b86c063042193cdf7f1ab8a33d823f4276c (patch) | |
tree | eb3055047376f60b47676570c2d11e6a6e19daa1 | |
parent | 1e474fcb57b72aa9012c7dd16d5d89aac4dce399 (diff) | |
download | hercules-7a1f3b86c063042193cdf7f1ab8a33d823f4276c.tar.gz hercules-7a1f3b86c063042193cdf7f1ab8a33d823f4276c.tar.bz2 hercules-7a1f3b86c063042193cdf7f1ab8a33d823f4276c.tar.xz hercules-7a1f3b86c063042193cdf7f1ab8a33d823f4276c.zip |
Fix -Woverflow warnings with gcc-6.
-rw-r--r-- | src/char/char.c | 2 | ||||
-rw-r--r-- | src/map/chrif.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c index 93078f8ee..665ccfe19 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3670,7 +3670,7 @@ void char_map_auth_ok(int fd, int account_id, struct char_auth_node* node, struc nullpo_retv(cd); WFIFOHEAD(fd,25 + sizeof(struct mmo_charstatus)); WFIFOW(fd,0) = 0x2afd; - WFIFOW(fd,2) = 25 + sizeof(struct mmo_charstatus); + WFIFOW(fd,2) = 25 + (uint16)sizeof(struct mmo_charstatus); WFIFOL(fd,4) = account_id; if (node) { diff --git a/src/map/chrif.c b/src/map/chrif.c index bf613b029..28b5485a1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -306,7 +306,7 @@ bool chrif_save(struct map_session_data *sd, int flag) { WFIFOHEAD(chrif->fd, sizeof(sd->status) + 13); WFIFOW(chrif->fd,0) = 0x2b01; - WFIFOW(chrif->fd,2) = sizeof(sd->status) + 13; + WFIFOW(chrif->fd,2) = (uint16)sizeof(sd->status) + 13; WFIFOL(chrif->fd,4) = sd->status.account_id; WFIFOL(chrif->fd,8) = sd->status.char_id; WFIFOB(chrif->fd,12) = (flag==1)?1:0; //Flag to tell char-server this character is quitting. |