# HG changeset patch # User Kim F. Storm # Date 1126532550 0 # Node ID c9bed10cbf6db69a92f03c23af590a8e8e7b4ec8 # Parent c1c7dc22a3c47d5db99cbd07b091610eef03a1e8 (message3): Pass copy of lisp string to message_dolog. diff -r c1c7dc22a3c4 -r c9bed10cbf6d src/xdisp.c --- 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;