summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2020-04-03 21:49:59 +0200
committerPhilipp Stephani <phst@google.com>2020-04-03 21:49:59 +0200
commit452d776a5da3f25ec1ce3a632c5df8db80b507ef (patch)
treef08eebae1fe26bed80212a446727db6f301ae6c9
parentfa823653ffb0e3e893d30daa5abf68e909934e2e (diff)
downloademacs-452d776a5da3f25ec1ce3a632c5df8db80b507ef.tar.gz
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.
-rw-r--r--src/emacs-module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index d56d03203b1..911b82b8a1a 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -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;