# HG changeset patch # User Kenichi Handa # Date 974682393 0 # Node ID dda5cbf94928dce76b62ac3de381e6fd81c0e020 # Parent c5e53e9b44afe9733d329ce8d9341999661bf3d1 (make_string): Fix previous change. Be sure to make unibyte string correctly. diff -r c5e53e9b44af -r dda5cbf94928 src/ChangeLog --- a/src/ChangeLog Sun Nov 19 22:11:34 2000 +0000 +++ b/src/ChangeLog Mon Nov 20 01:06:33 2000 +0000 @@ -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 -r c5e53e9b44af -r dda5cbf94928 src/alloc.c --- 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; }