]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix small bug in copy_string_contents.
authorPhilipp Stephani <phst@google.com>
Fri, 3 Apr 2020 19:49:59 +0000 (21:49 +0200)
committerPhilipp Stephani <phst@google.com>
Fri, 3 Apr 2020 19:49:59 +0000 (21:49 +0200)
* 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.

src/emacs-module.c

index d56d03203b19048b5ae975b8f255e6f18e597230..911b82b8a1acd939acdf65e4ea31a4af29983ec4 100644 (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;