summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-18 20:44:39 +0200
committerGitHub <noreply@github.com>2018-06-18 20:44:39 +0200
commit33e94478687ac8cefb2181d06d531d98db754091 (patch)
tree1cce67dbc07df637b2cad5bcb66e80a3ca454a5f
parent450c2df98e73b096c7b79b35bd1d3b75706e66d9 (diff)
parentd35d480881eb8491f360d016564997540796aacd (diff)
downloadhercules-33e94478687ac8cefb2181d06d531d98db754091.tar.gz
hercules-33e94478687ac8cefb2181d06d531d98db754091.tar.bz2
hercules-33e94478687ac8cefb2181d06d531d98db754091.tar.xz
hercules-33e94478687ac8cefb2181d06d531d98db754091.zip
Merge pull request #2072 from 4144/fixvend
Fix clif_parse_OpenVending with empty items list.
-rw-r--r--src/map/clif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8b1f2a8ca..85f034446 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11081,7 +11081,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) __attribute_
/// 1 = public
void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; //not zero-terminated
@@ -11137,7 +11137,7 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd) __attr
/// 1 = public
void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; // not zero-terminated
@@ -13148,12 +13148,12 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) __attribute__((
/// 0 = canceled
/// 1 = open
void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
- short len = (short)RFIFOW(fd,2) - 85;
+ int len = (int)RFIFOW(fd, 2) - 85;
const char *message;
bool flag;
const uint8 *data;
- if (len < 1)
+ if (len < 0)
return;
message = RFIFOP(fd,4);