summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-25 20:35:49 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-25 20:35:49 +0000
commit35712069f3401965c6e26233d01a1a893e0ca326 (patch)
tree07283908ef6fa57eb330572bce10f7ee4f20638c /src/map/mail.c
parent996e110eed6376fca158fb0136c55aea5ac819be (diff)
downloadhercules-35712069f3401965c6e26233d01a1a893e0ca326.tar.gz
hercules-35712069f3401965c6e26233d01a1a893e0ca326.tar.bz2
hercules-35712069f3401965c6e26233d01a1a893e0ca326.tar.xz
hercules-35712069f3401965c6e26233d01a1a893e0ca326.zip
* Fixed zeny duplication exploit in mail system, introduced in r15310.
* Added proper mail zeny loss prevention (bugreport:2919, follow-up to r15310). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15520 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index bb1063fbf..249f93abc 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -46,8 +46,7 @@ int mail_removeitem(struct map_session_data *sd, short flag)
int mail_removezeny(struct map_session_data *sd, short flag)
{
nullpo_ret(sd);
- if( ( sd->status.zeny + sd->mail.zeny ) > MAX_ZENY )
- return 1;
+
if (flag && sd->mail.zeny > 0)
{ //Zeny send
log_zeny(sd, LOG_TYPE_MAIL, sd, -sd->mail.zeny);