From 2f5ddf8f1434a032bbc2658983525b8a41355400 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 31 May 2018 13:49:05 +0200 Subject: [PATCH] Fix bug in the method checking the validity of DateTime CPIM header. --- src/chat/cpim/parser/cpim-parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat/cpim/parser/cpim-parser.cpp b/src/chat/cpim/parser/cpim-parser.cpp index 96d63e499..83dd037ce 100644 --- a/src/chat/cpim/parser/cpim-parser.cpp +++ b/src/chat/cpim/parser/cpim-parser.cpp @@ -335,7 +335,7 @@ namespace Cpim { if (mTime.tm_mon < 1 || mTime.tm_mon > 12) return false; - if (mTime.tm_mday < 1 || (mTime.tm_mon == 2 && isLeapYear ? mTime.tm_mday > 29 : mTime.tm_mday > daysInMonth[mTime.tm_mon - 1])) + if (mTime.tm_mday < 1 || (mTime.tm_mon == 2 && isLeapYear ? mTime.tm_mday > 29 : mTime.tm_mday > daysInMonth[mTime.tm_mon])) return false; // Check time.