diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 9 |
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) | |||
| 8419 | Lisp_Object | 8419 | Lisp_Object |
| 8420 | from_unicode_buffer (const wchar_t *wstr) | 8420 | from_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 | ||
| 8429 | wchar_t * | 8428 | wchar_t * |