Browse Source

- 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
zephyrus 17 years ago
parent
commit
bb503db395
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/map/mail.c

+ 1 - 1
src/map/mail.c

@@ -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;