changeset 65464:c9bed10cbf6d

(message3): Pass copy of lisp string to message_dolog.
author Kim F. Storm <storm@cua.dk>
date Mon, 12 Sep 2005 13:42:30 +0000
parents c1c7dc22a3c4
children 5780d53d7894
files src/xdisp.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Sep 12 13:42:15 2005 +0000
+++ b/src/xdisp.c	Mon Sep 12 13:42:30 2005 +0000
@@ -7061,7 +7061,15 @@
   /* First flush out any partial line written with print.  */
   message_log_maybe_newline ();
   if (STRINGP (m))
-    message_dolog (SDATA (m), nbytes, 1, multibyte);
+    {
+      char *buffer;
+      USE_SAFE_ALLOCA;
+
+      SAFE_ALLOCA (buffer, char *, nbytes);
+      bcopy (SDATA (m), buffer, nbytes);
+      message_dolog (buffer, nbytes, 1, multibyte);
+      SAFE_FREE ();
+    }
   message3_nolog (m, nbytes, multibyte);
 
   UNGCPRO;