diff options
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/vending.c b/src/map/vending.c index 54af338c1..ec9076310 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -141,7 +141,7 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f } if (flag) { - for(i = 0; 85 + 8 * i < len; i++) { + for(i = 0; (85 + 8 * i < len) && (i < MAX_VENDING); i++) { sd->vending[i].index = *(short*)(p+8*i)-2; sd->vending[i].amount = *(short*)(p+2+8*i); sd->vending[i].value = *(int*)(p+4+8*i); @@ -154,7 +154,6 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f } sd->vender_id = sd->bl.id; sd->vend_num = i; - Assert (sd->vend_num < (sizeof (sd->vending) / sizeof(sd->vending[0]))); strcpy(sd->message,message); if (clif_openvending(sd,sd->vender_id,sd->vending) > 0) clif_showvendingboard(&sd->bl,message,0); |