Fix bug in the method checking the validity of DateTime CPIM header.

This commit is contained in:
Simon Morlat 2018-05-31 13:49:05 +02:00
parent 8352ebcafd
commit 2f5ddf8f14

View file

@ -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.