fixed problem with numbers having > 19 fractional places (bug 133921)
* xpath.c: fixed problem with numbers having > 19
fractional places (bug 133921)
diff --git a/ChangeLog b/ChangeLog
index e5dbbcc..39bca7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 17 21:08:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with numbers having > 19
+ fractional places (bug 133921)
+
Tue Feb 17 12:47:20 CET 2004 Daniel Veillard <daniel@veillard.com>
* xpath.c: applied optimization patch from Petr Pajas
diff --git a/xpath.c b/xpath.c
index 3f3e436..4d061cb 100644
--- a/xpath.c
+++ b/xpath.c
@@ -7488,13 +7488,18 @@
#define MAX_FRAC 20
-static double my_pow10[MAX_FRAC] = {
+/*
+ * These are used as divisors for the fractional part of a number.
+ * Since the table includes 1.0 (representing '0' fractional digits),
+ * it must be dimensioned at MAX_FRAC+1 (bug 133921)
+ */
+static double my_pow10[MAX_FRAC+1] = {
1.0, 10.0, 100.0, 1000.0, 10000.0,
100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0,
10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0,
100000000000000.0,
1000000000000000.0, 10000000000000000.0, 100000000000000000.0,
- 1000000000000000000.0, 10000000000000000000.0
+ 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0
};
/**