From 6ed12fe8f8d07a8bbcf5ab6774064e9a99be4336 Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Mon, 10 Nov 2003 18:10:15 +0000 Subject: [PATCH] Fixed a bug "FcStrtod" in handling some cases with two-byte decimal separators. --- ChangeLog | 6 ++++++ src/fcxml.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f9fa8b8..4342455 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-10 Roozbeh Pournader + + * src/fcxml.c: + Fixed a bug "FcStrtod" in handling some cases with two-byte decimal + separators. + 2003-06-09 Keith Packard * Tag version 2.2.1 diff --git a/src/fcxml.c b/src/fcxml.c index ffde1b6..3d3023f 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -962,7 +962,9 @@ FcStrtod (char *s, char **end) buf_end = 0; v = strtod (buf, &buf_end); if (buf_end) - buf_end = s + (buf_end - buf) + 1 - dlen; + buf_end = s + (buf_end - buf); + if (buf_end > dot) + buf_end -= dlen - 1; if (end) *end = buf_end; } -- 2.39.5