From 1decb6802272deceb011219460fc380ba9929d41 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Oct 1998 00:16:49 +0000 Subject: [PATCH] (XTread_socket): Check the returned value of XmbLookupString more carefully. --- src/xterm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index b9a8d1c3ed4..e04b04ea651 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4239,6 +4239,13 @@ XTread_socket (sd, bufp, numchars, expected) &event.xkey, copy_buffer, 80, &keysym, &status_return); + if (status_return == XLookupNone) + break; + else if (status_return == XLookupChars) + keysym = NoSymbol; + else if (status_return != XLookupKeySym + && status_return != XLookupBoth) + abort (); } else nbytes = XLookupString (&event.xkey, copy_buffer, @@ -4357,6 +4364,9 @@ XTread_socket (sd, bufp, numchars, expected) count += nbytes; numchars -= nbytes; + + if (keysym == NoSymbol) + break; } else abort (); -- 2.39.2