Mercurial > emacs
diff src/alloc.c @ 33623:dda5cbf94928
(make_string): Fix previous change. Be sure to make
unibyte string correctly.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Mon, 20 Nov 2000 01:06:33 +0000 |
| parents | 416924b6f303 |
| children | a832bb73de79 |
line wrap: on
line diff
--- a/src/alloc.c Sun Nov 19 22:11:34 2000 +0000 +++ b/src/alloc.c Mon Nov 20 01:06:33 2000 +0000 @@ -1701,12 +1701,12 @@ int nchars, multibyte_nbytes; parse_str_as_multibyte (contents, nbytes, &nchars, &multibyte_nbytes); - val = make_uninit_multibyte_string (nchars, nbytes); - bcopy (contents, XSTRING (val)->data, nbytes); if (nbytes == nchars || nbytes != multibyte_nbytes) /* CONTENTS contains no multibyte sequences or contains an invalid multibyte sequence. We must make unibyte string. */ - SET_STRING_BYTES (XSTRING (val), -1); + val = make_unibyte_string (contents, nbytes); + else + val = make_multibyte_string (contents, nchars, nbytes); return val; }
