summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/mail.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 2b0dcb3cb..d2dce6f17 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -120,6 +120,9 @@ bool mail_setattachment(struct map_session_data *sd, struct mail_message *msg)
if( sd->status.inventory[n].amount < sd->mail.amount )
return false;
+ if( sd->weight > sd->max_weight )
+ return false;
+
memcpy(&msg->item, &sd->status.inventory[n], sizeof(struct item));
msg->item.amount = sd->mail.amount;
}