- Fixed a possible crash bug on mail system.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12320 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
zephyrus 2008-03-07 20:40:59 +00:00
parent 1a04548970
commit bb503db395

View File

@ -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 )
return 1;