summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4e55a515b..31f7961d5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -13884,7 +13884,8 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd) {
return;
}
// move everything one place down to overwrite removed entry
- memmove(sd->ignore[i].name, sd->ignore[i+1].name, (MAX_IGNORE_LIST-i-1)*sizeof(sd->ignore[0].name));
+ if( i != MAX_IGNORE_LIST - 1 )
+ memmove(sd->ignore[i].name, sd->ignore[i+1].name, (MAX_IGNORE_LIST-i-1)*sizeof(sd->ignore[0].name));
// wipe last entry
memset(sd->ignore[MAX_IGNORE_LIST-1].name, 0, sizeof(sd->ignore[0].name));
}
@@ -17747,7 +17748,7 @@ void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) {
short tab = RFIFOW(fd, 2);
int j;
- if( tab < 0 || tab > CASHSHOP_TAB_MAX || clif->cs.item_count[tab] == 0 )
+ if( tab < 0 || tab >= CASHSHOP_TAB_MAX || clif->cs.item_count[tab] == 0 )
return;
WFIFOHEAD(fd, 10 + ( clif->cs.item_count[tab] * 6 ) );