fix bytes->string/utf-8 when permissive char is NUL
svn: r3724
This commit is contained in:
parent
0dba7be788
commit
721cdd300b
|
@ -1036,6 +1036,8 @@
|
|||
(test '(#o302 #o251) bytes->list (unicode-vector->bytes (vector 169)))
|
||||
(test '(#o304 #o250) bytes->list (unicode-vector->bytes (vector 296)))
|
||||
|
||||
(test "a\0b" bytes->string/utf-8 #"a\xFFb" (integer->char 0))
|
||||
|
||||
(test '("\uA9") regexp-match #rx"." "\uA9")
|
||||
(test '(#"\302") regexp-match #rx#"." #"\302\251")
|
||||
(test '(#"\302") regexp-match #rx#"." "\uA9")
|
||||
|
|
|
@ -1104,7 +1104,7 @@ do_byte_string_to_char_string(const char *who,
|
|||
NULL, 0,
|
||||
(perm > -1) ? 0xD800 : 0);
|
||||
|
||||
if (perm > 0) {
|
||||
if (perm > -1) {
|
||||
for (i = 0; i < ulen; i++) {
|
||||
if (v[i] == 0xD800)
|
||||
v[i] = perm;
|
||||
|
|
Loading…
Reference in New Issue
Block a user