# HG changeset patch # User Richard M. Stallman # Date 884388789 0 # Node ID 3bdf83b2794655de05f6b7d273fc8ba80d75ee3e # Parent 8e7e791c49ca6da7d7136e0afcb0ef82d3e128d8 (Fcall_interactively): Allocate string by bytes. Use message_with_string. diff -r 8e7e791c49ca -r 3bdf83b27946 src/callint.c --- a/src/callint.c Fri Jan 09 23:28:38 1998 +0000 +++ b/src/callint.c Fri Jan 09 23:33:09 1998 +0000 @@ -288,8 +288,8 @@ { /* Make a copy of string so that if a GC relocates specs, `string' will still be valid. */ - string = (unsigned char *) alloca (XSTRING (specs)->size + 1); - bcopy (XSTRING (specs)->data, string, XSTRING (specs)->size + 1); + string = (unsigned char *) alloca (XSTRING (specs)->size_byte + 1); + bcopy (XSTRING (specs)->data, string, XSTRING (specs)->size_byte + 1); } else if (string == 0) { @@ -487,10 +487,10 @@ break; case 'c': /* Character */ - /* Use message_nolog rather than message1_nolog here, + /* Use message_with_string rather than message1_nolog here, so that nothing bad happens if callint_message is changed within Fread_char (by a timer, for example). */ - message_nolog ("%s", callint_message); + message_with_string ("%s", build_string (callint_message), 0); args[i] = Fread_char (); message1_nolog ((char *) 0); /* Passing args[i] directly stimulates compiler bug */