summaryrefslogtreecommitdiff
path: root/src/w32inevt.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-21 17:53:04 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-21 17:53:04 +0300
commitf0177f86f745ef86357214b110f9d98e4ed63b7a (patch)
tree85f8cbb3a930a39ea84bb02637279b7a783d37eb /src/w32inevt.c
parente11a3bd1d1848d0a3a2ac21a48360eb628127ed9 (diff)
downloademacs-f0177f86f745ef86357214b110f9d98e4ed63b7a.tar.gz
Fix infinite loop in menu input due to block_input.
Diffstat (limited to 'src/w32inevt.c')
-rw-r--r--src/w32inevt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c
index ce36f291b00..3c41bec6bb5 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -712,12 +712,17 @@ w32_console_read_socket (struct terminal *terminal,
while (nev > 0)
{
struct input_event inev;
+ /* Having a separate variable with this value makes
+ debugging easier, as otherwise the compiler might
+ rearrange the switch below in a way that makes it hard to
+ track the event type. */
+ unsigned evtype = queue_ptr->EventType;
EVENT_INIT (inev);
inev.kind = NO_EVENT;
inev.arg = Qnil;
- switch (queue_ptr->EventType)
+ switch (evtype)
{
case KEY_EVENT:
add = key_event (&queue_ptr->Event.KeyEvent, &inev, &isdead);