diff options
Diffstat (limited to 'xmlschemastypes.c')
-rw-r--r-- | xmlschemastypes.c | 3 |
1 files changed, 2 insertions, 1 deletions
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--; } |