Fixed a bug "FcStrtod" in handling some cases with two-byte decimal

separators.
This commit is contained in:
Roozbeh Pournader 2003-11-10 17:34:36 +00:00
parent 27143fc9a2
commit 344a0e3361
2 changed files with 12 additions and 3 deletions

View File

@ -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:

View 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;
}