aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c
index e72d7b71867..bcedd7f5eeb 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8419,11 +8419,10 @@ from_unicode (Lisp_Object str)
8419Lisp_Object 8419Lisp_Object
8420from_unicode_buffer (const wchar_t *wstr) 8420from_unicode_buffer (const wchar_t *wstr)
8421{ 8421{
8422 return from_unicode ( 8422 /* We get one of the two final null bytes for free. */
8423 make_unibyte_string ( 8423 prtdiff_t len = 1 + sizeof (wchar_t) * wcslen (wstr);
8424 (char *) wstr, 8424 AUTO_STRING_WITH_LEN (str, (char *) wstr, len);
8425 /* we get one of the two final 0 bytes for free. */ 8425 return from_unicode (str);
8426 1 + sizeof (wchar_t) * wcslen (wstr)));
8427} 8426}
8428 8427
8429wchar_t * 8428wchar_t *