From: William M. Brack Date: Tue, 7 Sep 2004 07:14:42 +0000 (+0000) Subject: fixed problem with UTF8 pattern separator (bug 151975) X-Git-Tag: v1.1.28~385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=edf62473b4edb150f566098aff5a70c5416f9a4e;p=platform%2Fupstream%2Flibxslt.git fixed problem with UTF8 pattern separator (bug 151975) * libxslt/numbers.c: fixed problem with UTF8 pattern separator (bug 151975) --- diff --git a/ChangeLog b/ChangeLog index c9bd062..5cf705a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 7 00:14:12 PDT 2004 William Brack + + * libxslt/numbers.c: fixed problem with UTF8 pattern + separator (bug 151975) + Mon Sep 6 14:27:38 PDT 2004 William Brack * libxslt/imports.c, libxslt/xslt.c, libxslt/xsltInternals.h: diff --git a/libxslt/numbers.c b/libxslt/numbers.c index 6382bcd..1660793 100644 --- a/libxslt/numbers.c +++ b/libxslt/numbers.c @@ -1182,8 +1182,15 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self, default_sign = 1; } else { + int lenPS; + lenPS = xmlUTF8Size(self->patternSeparator); + if (lenPS <= 0) { + found_error = 1; + goto OUTPUT_NUMBER; + } + /* Skip over pattern separator */ - the_format = format + j + 1; + the_format = format + j + lenPS; /* * Flag changes interpretation of percent/permille * in -ve pattern