From: Roozbeh Pournader Date: Mon, 10 Nov 2003 18:10:15 +0000 (+0000) Subject: Fixed a bug "FcStrtod" in handling some cases with two-byte decimal X-Git-Tag: fc-2_2_2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6ed12fe8f8d07a8bbcf5ab6774064e9a99be4336;p=fontconfig.git Fixed a bug "FcStrtod" in handling some cases with two-byte decimal separators. --- 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; }