]> git.wh0rd.org Git - fontconfig.git/commitdiff
Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
authorRoozbeh Pournader <roozbeh@farsiweb.info>
Mon, 10 Nov 2003 18:10:15 +0000 (18:10 +0000)
committerRoozbeh Pournader <roozbeh@farsiweb.info>
Mon, 10 Nov 2003 18:10:15 +0000 (18:10 +0000)
    separators.

ChangeLog
src/fcxml.c

index f9fa8b89d60de8f2b423e4f20a395c44577c0135..4342455175e33ccf7715cb4e5b2c2b83c1f2c60f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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-06-09  Keith Packard <keithp@keithp.com>
 
        * Tag version 2.2.1
index ffde1b69f4a8df0d0b1547fe20212b15d2aee08d..3d3023ff22afbb63a1c64de8896964b01f6c6676 100644 (file)
@@ -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;
        }