From 6d30ff2c08b381cff003eead71bf1321a0c0feea Mon Sep 17 00:00:00 2001 From: "Kasimier T. Buchcik" Date: Wed, 6 Jul 2005 11:44:51 +0000 Subject: 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. --- xmlschemastypes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmlschemastypes.c') diff --git a/xmlschemastypes.c b/xmlschemastypes.c index d9fee06e..27f7b536 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -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--; } -- cgit v1.2.1