Don’t silently truncate connection-lost diagnostic
* src/xterm.c (x_io_error_quitter): Do not silently truncate the diagnostic when a connection is lost to an X server.
This commit is contained in:
parent
db9ea9b77a
commit
2efffbe773
1 changed files with 6 additions and 4 deletions
10
src/xterm.c
10
src/xterm.c
|
@ -27123,11 +27123,13 @@ x_error_quitter (Display *display, XErrorEvent *event)
|
|||
static int NO_INLINE
|
||||
x_io_error_quitter (Display *display)
|
||||
{
|
||||
char buf[256];
|
||||
|
||||
snprintf (buf, sizeof buf, "Connection lost to X server '%s'",
|
||||
DisplayString (display));
|
||||
char const *server = DisplayString (display);
|
||||
static char const fmt[] = "Connection lost to X server '%s'";
|
||||
USE_SAFE_ALLOCA;
|
||||
char *buf = SAFE_ALLOCA (sizeof fmt - sizeof "%s" + strlen (server) + 1);
|
||||
sprintf (buf, fmt, server);
|
||||
x_connection_closed (display, buf, true);
|
||||
SAFE_FREE ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue