summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-28 15:12:54 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-28 15:12:54 +0000
commit190793600675c03e76b527f12142d33f119d4f92 (patch)
tree5766125f522e4dfe7009ffc4f9e26e0cce2c9e14 /src/map/mail.c
parent86c9547726dcc3592a4ecccac0622c49b2da68d8 (diff)
downloadhercules-190793600675c03e76b527f12142d33f119d4f92.tar.gz
hercules-190793600675c03e76b527f12142d33f119d4f92.tar.bz2
hercules-190793600675c03e76b527f12142d33f119d4f92.tar.xz
hercules-190793600675c03e76b527f12142d33f119d4f92.zip
- Fixed a bug on the Attachment [Mail System]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11593 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index c95d6fbfa..e1c006a0a 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -55,7 +55,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount)
if (idx == 0)
{ // Zeny Transfer
if (amount < 0)
- return 2; //FIXME: totally wrong value
+ return 0;
if (amount > sd->status.zeny)
amount = sd->status.zeny;
@@ -105,6 +105,8 @@ bool mail_getattach(struct map_session_data *sd, struct mail_message *msg)
memcpy(&msg->item, &sd->status.inventory[n], sizeof(struct item));
msg->item.amount = sd->mail.amount;
}
+ else
+ memset(&msg->item, 0x00, sizeof(struct item));
msg->zeny = sd->mail.zeny;