]> git.eshelyaron.com Git - emacs.git/commitdiff
(print_error_message): Pass copy of caller name to message_dolog.
authorKim F. Storm <storm@cua.dk>
Mon, 12 Sep 2005 13:42:40 +0000 (13:42 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 12 Sep 2005 13:42:40 +0000 (13:42 +0000)
src/print.c

index 65c48b6d82b57d8892ea180b0a48c97f1642bdab..2ba749aff4498c1184647a7ff217f28836dbfefd 100644 (file)
@@ -1025,7 +1025,9 @@ print_error_message (data, stream, context, caller)
    *Messages*.  */
   if (!NILP (caller) && SYMBOLP (caller))
     {
-      const char *name = SDATA (SYMBOL_NAME (caller));
+      Lisp_Object cname = SYMBOL_NAME (caller);
+      char *name = alloca (SBYTES (cname));
+      bcopy (SDATA (cname), name, SBYTES (cname));
       message_dolog (name, strlen (name), 0, 0);
       message_dolog (": ", 2, 0, 0);
     }