Skip to content

Commit 776befc

Browse files
Merge pull request #2266 from dastgirp/coverity/fix2
Fixed a condition in RoDEX attachment
2 parents 052cbc8 + 64bbdb5 commit 776befc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/map/clif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16891,7 +16891,7 @@ static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
1689116891
if( sd->mail.inbox.msg[i].zeny < 1 && (sd->mail.inbox.msg[i].item.nameid < 1 || sd->mail.inbox.msg[i].item.amount < 1) )
1689216892
return;
1689316893

16894-
if( sd->mail.inbox.msg[i].zeny + sd->status.zeny > MAX_ZENY ) {
16894+
if( sd->mail.inbox.msg[i].zeny > MAX_ZENY - sd->status.zeny ) {
1689516895
clif->mail_getattachment(fd, 1);
1689616896
return;
1689716897
}

0 commit comments

Comments
 (0)