diff --git a/src/ChangeLog b/src/ChangeLog index a88fc35df915f955d9209cbc6d802b26ac9f3fef..855b89bbb1bcfa55346554832148309e4517f145 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-11-20 Kenichi Handa + + * alloc.c (make_string): Fix previous change. Be sure to make + unibyte string correctly. + 2000-11-19 Gerd Moellmann * window.c (Fwindow_list): Change parameter list to be XEmacs diff --git a/src/alloc.c b/src/alloc.c index 625dc14720fa4dfc629f243b83ffc7f92353bf85..bf93f6705b45f7e34a38e9c90635bce9327b945a 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; }