git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12320 54d463be-8e91-2dee-dedb-b68131a5f0ec
@@ -87,7 +87,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount)
idx -= 2;
mail_removeitem(sd, 0);
- if( idx < 0 || idx > MAX_INVENTORY )
+ if( idx < 0 || idx >= MAX_INVENTORY )
return 1;
if( amount < 0 || amount > sd->status.inventory[idx].amount )