1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00

Fix small bug in copy_string_contents.

* src/emacs-module.c (module_copy_string_contents): Fix incorrect
variable use.  In this branch 'lisp_str_utf8' is always nil, so it
makes little sense to add it as error data.
This commit is contained in:
Philipp Stephani 2020-04-03 21:49:59 +02:00
parent fa823653ff
commit 452d776a5d

View File

@ -637,7 +637,7 @@ module_copy_string_contents (emacs_env *env, emacs_value value, char *buffer,
/* Since we set HANDLE-8-BIT and HANDLE-OVER-UNI to nil, the return
value can be nil, and we have to check for that. */
CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str_utf8);
CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str);
ptrdiff_t raw_size = SBYTES (lisp_str_utf8);
ptrdiff_t required_buf_size = raw_size + 1;