diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-02-11 12:49:44 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-02-11 12:52:21 +0100 |
commit | 414fa67bf20f1c8b1b75790142babb655a052ca9 (patch) | |
tree | c5e03fca0cf2f8a73cd84268c39441d585e2a85b /sax | |
parent | 7949b380e054342c80035d406c89ddc5badacfad (diff) |
sax: my suggestion was not as good as i thought...
... as indicated by the failing unit test.
Change-Id: I1a8a8b933b10673e71261726dc8887dfe1d3e2ee
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/converter.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 48ad958d5692..6642a60c4d8a 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1545,8 +1545,12 @@ static bool lcl_parseDate( if (!bIgnoreInvalidOrMissingDate) { bSuccess &= (0 < nDay); + } + if (nMonth > 0) // not possible to check if month was missing + { bSuccess &= (nDay <= lcl_MaxDaysPerMonth(nMonth, nYear)); } + else assert(bIgnoreInvalidOrMissingDate); } if (bSuccess && (nPos < string.getLength())) |