From edf62473b4edb150f566098aff5a70c5416f9a4e Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Tue, 7 Sep 2004 07:14:42 +0000 Subject: [PATCH] fixed problem with UTF8 pattern separator (bug 151975) * libxslt/numbers.c: fixed problem with UTF8 pattern separator (bug 151975) --- ChangeLog | 5 +++++ libxslt/numbers.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 -- 2.7.4