1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

Fixed bug #309338, reported by Kupriyanov Anotolij. Added a regression

* xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov
  Anotolij.
* test/schemas/bug309338* result/schemas/bug309338*:
  Added a regression test for the above bug.
This commit is contained in:
Kasimier T. Buchcik 2005-07-06 11:44:51 +00:00
parent 87b3046bc1
commit 6d30ff2c08
6 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov
Anotolij.
* test/schemas/bug309338* result/schemas/bug309338*:
Added a regression test for the above bug.
Tue Jul 5 16:03:05 CEST 2005 Daniel Veillard <daniel@veillard.com>
* Makefile.am: first steps toward a testsuite dist

View File

@ -0,0 +1 @@
./test/schemas/bug309338_0.xml validates

View File

View File

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<foo xmlns="urn:test:foo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:test:foo bug309338.xsd">2000.00</foo>

View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:f="urn:test:foo"
targetNamespace="urn:test:foo">
<xsd:element name="foo" type="f:fooType"/>
<xsd:simpleType name="fooType">
<xsd:restriction base="xsd:decimal">
<xsd:minExclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@ -2194,7 +2194,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
* If a mixed decimal, get rid of trailing zeroes
*/
if (dec != -1) {
while ((cptr > cval) && (*(cptr-1) == '0')) {
while ((len > dec) && (cptr > cval) &&
(*(cptr-1) == '0')) {
cptr--;
len--;
}