summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@farsiweb.info>2003-11-10 17:34:36 +0000
committerRoozbeh Pournader <roozbeh@farsiweb.info>2003-11-10 17:34:36 +0000
commit344a0e33618cd0e9f620b5fa55969602d775934c (patch)
tree29f55dbb333ed3c0e3b6232864f25b749938af22
parent27143fc9a2ac9b7dc87ab874251df356611b25e5 (diff)
Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
separators.
-rw-r--r--ChangeLog8
-rw-r--r--src/fcxml.c7
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ef431b..d8a9b9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2003-10-27 Keith Packard <set EMAIL_ADDRESS environment variable>
+2003-11-10 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * src/fcxml.c:
+ Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
+ separators.
+
+2003-10-27 Keith Packard <keith@keithp.com>
* configure.in:
* fontconfig/fontconfig.h:
diff --git a/src/fcxml.c b/src/fcxml.c
index e54f07e..70aeb03 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -975,8 +975,11 @@ FcStrtod (char *s, char **end)
strcpy (buf + (dot - s) + dlen, dot + 1);
buf_end = 0;
v = strtod (buf, &buf_end);
- if (buf_end)
- buf_end = s + (buf_end - buf) + 1 - dlen;
+ if (buf_end) {
+ buf_end = s + (buf_end - buf);
+ if (buf_end > dot)
+ buf_end -= dlen - 1;
+ }
if (end)
*end = buf_end;
}