]> 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 17:34:36 +0000 (17:34 +0000)
committerRoozbeh Pournader <roozbeh@farsiweb.info>
Mon, 10 Nov 2003 17:34:36 +0000 (17:34 +0000)
    separators.

ChangeLog
src/fcxml.c

index 8ef431bc8df95cfc0050a073cd100a08a8262d69..d8a9b9b011706e0af4f79fa45d06fa80b5b7af95 100644 (file)
--- 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:
index e54f07e8d2ca031b37ee22fb42842728c00eb170..70aeb034a49736ccc7f8973462d5535eebafb333 100644 (file)
@@ -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;
        }