Commit 495a6df3 authored by Kenichi Handa's avatar Kenichi Handa

(make_string): Fix previous change. Be sure to make

unibyte string correctly.
parent 030de92f
2000-11-20 Kenichi Handa <handa@etl.go.jp>
* alloc.c (make_string): Fix previous change. Be sure to make
unibyte string correctly.
2000-11-19 Gerd Moellmann <gerd@gnu.org> 2000-11-19 Gerd Moellmann <gerd@gnu.org>
* window.c (Fwindow_list): Change parameter list to be XEmacs * window.c (Fwindow_list): Change parameter list to be XEmacs
......
...@@ -1701,12 +1701,12 @@ make_string (contents, nbytes) ...@@ -1701,12 +1701,12 @@ make_string (contents, nbytes)
int nchars, multibyte_nbytes; int nchars, multibyte_nbytes;
parse_str_as_multibyte (contents, nbytes, &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) if (nbytes == nchars || nbytes != multibyte_nbytes)
/* CONTENTS contains no multibyte sequences or contains an invalid /* CONTENTS contains no multibyte sequences or contains an invalid
multibyte sequence. We must make unibyte string. */ 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; return val;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment