diff options
| author | Kenichi Handa <handa@m17n.org> | 2000-11-20 01:06:33 +0000 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 2000-11-20 01:06:33 +0000 |
| commit | 495a6df36d7e6f8fa29084076e738ca3f2a07985 (patch) | |
| tree | dff8b8257bb977b280028ff4c9ea93340bcc7613 /src/alloc.c | |
| parent | 030de92f84ce02cb24cbca4d07ee471a095c493c (diff) | |
(make_string): Fix previous change. Be sure to make
unibyte string correctly.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 625dc14720f..bf93f6705b4 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1701,12 +1701,12 @@ make_string (contents, nbytes) 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; } |
