HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a2eeb
)
fix buggy scm_from_utf8_stringn (!)
author
Andy Wingo
<wingo@pobox.com>
Tue, 14 Feb 2012 13:24:04 +0000
(14:24 +0100)
committer
Andy Wingo
<wingo@pobox.com>
Tue, 14 Feb 2012 13:24:32 +0000
(14:24 +0100)
* libguile/strings.c (scm_from_utf8_stringn): Embarassingly, my
scm_from_utf8_stringn implementation was buggy for non-ascii
characters, since October (
41d1d984
). Fixed. Will be tested with the
next patch.
libguile/strings.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/strings.c
b/libguile/strings.c
index
bdd0065
..
8c404a3
100644
(file)
--- a/
libguile/strings.c
+++ b/
libguile/strings.c
@@
-1669,7
+1669,7
@@
scm_from_utf8_stringn (const char *str, size_t len)
res = scm_i_make_string (char_len, &dst, 0);
- for (i = 0, j = 0; i < len;
i++,
j++)
+ for (i = 0, j = 0; i < len; j++)
{
i += u8_mbtouc_unsafe (&c, ustr + i, len - i);
dst[j] = (signed char) c;
@@
-1683,7
+1683,7
@@
scm_from_utf8_stringn (const char *str, size_t len)
res = scm_i_make_wide_string (char_len, &dst, 0);
- for (i = 0, j = 0; i < len;
i++,
j++)
+ for (i = 0, j = 0; i < len; j++)
{
i += u8_mbtouc_unsafe (&c, ustr + i, len - i);
dst[j] = c;