summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-01-13 00:03:35 +0100
committerGitHub <noreply@github.com>2020-01-13 00:03:35 +0100
commit776befcb4eedded935451078f00ae9ed50e8bd3e (patch)
tree924fff2adee59ef9c5f9ada3c7b86dcff4cad656
parent052cbc88b651be835bce3976094b8523be56a8a4 (diff)
parent64bbdb550b21210c090b93cbdeb3124aff48d607 (diff)
downloadhercules-776befcb4eedded935451078f00ae9ed50e8bd3e.tar.gz
hercules-776befcb4eedded935451078f00ae9ed50e8bd3e.tar.bz2
hercules-776befcb4eedded935451078f00ae9ed50e8bd3e.tar.xz
hercules-776befcb4eedded935451078f00ae9ed50e8bd3e.zip
Merge pull request #2266 from dastgirp/coverity/fix2
Fixed a condition in RoDEX attachment
-rw-r--r--src/map/clif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 6ba0db2f3..9da6a592e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16891,7 +16891,7 @@ static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
if( sd->mail.inbox.msg[i].zeny < 1 && (sd->mail.inbox.msg[i].item.nameid < 1 || sd->mail.inbox.msg[i].item.amount < 1) )
return;
- if( sd->mail.inbox.msg[i].zeny + sd->status.zeny > MAX_ZENY ) {
+ if( sd->mail.inbox.msg[i].zeny > MAX_ZENY - sd->status.zeny ) {
clif->mail_getattachment(fd, 1);
return;
}