From 931920c3bee2151a79f9b54f4133af83f59ed052 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Aug 2017 23:10:41 +0300 Subject: Fix compilation with some compilers. --- src/net/eathena/mail2handler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index 3c412fc4e..bf6f178fb 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -111,7 +111,7 @@ void Mail2Handler::sendMail(const std::string &to, const int titleSz = CAST_S32(title.size()); const int bodySz = CAST_S32(body.size()); int32_t sz = 2 + 2 + 24 + 24 + 8 + 2 + 2 + titleSz + bodySz; - if (sz > INT16_MAX - 4) + if (sz > 32767 - 4) { reportAlways("Mail message too big"); return; -- cgit v1.2.3-60-g2f50