From cdcb5a4d2564bb3ad9f9fe017fda06506ecc2618 Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Thu, 26 Feb 2004 00:52:10 +0000 Subject: [PATCH] (Sigh.) Don't try to read more events than the buffer size. src/xterm.c (XTread_socket): Don't try to read more events than numchars. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-102 --- src/xterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 90bd9abd6cf..546c93600d4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7205,7 +7205,7 @@ XTread_socket (display, bufp, numchars, expected) #endif #ifndef USE_GTK - while (XPending (dpyinfo->display)) + while (numchars > 0 && XPending (dpyinfo->display)) { int finish;