Kaydet (Commit) 414fa67b authored tarafından Michael Stahl's avatar Michael Stahl

sax: my suggestion was not as good as i thought...

... as indicated by the failing unit test.

Change-Id: I1a8a8b933b10673e71261726dc8887dfe1d3e2ee
üst 7949b380
...@@ -1545,8 +1545,12 @@ static bool lcl_parseDate( ...@@ -1545,8 +1545,12 @@ static bool lcl_parseDate(
if (!bIgnoreInvalidOrMissingDate) if (!bIgnoreInvalidOrMissingDate)
{ {
bSuccess &= (0 < nDay); bSuccess &= (0 < nDay);
}
if (nMonth > 0) // not possible to check if month was missing
{
bSuccess &= (nDay <= lcl_MaxDaysPerMonth(nMonth, nYear)); bSuccess &= (nDay <= lcl_MaxDaysPerMonth(nMonth, nYear));
} }
else assert(bIgnoreInvalidOrMissingDate);
} }
if (bSuccess && (nPos < string.getLength())) if (bSuccess && (nPos < string.getLength()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment