Swallow unexpected timeout keycode
authorBill Lash <william.lash@gmail.com>
Fri, 30 Aug 2019 02:52:02 +0000 (21:52 -0500)
committerBill Lash <william.lash@gmail.com>
Fri, 30 Aug 2019 02:52:02 +0000 (21:52 -0500)
Insted of passing on an timeout event when there is no timeout set,
just skip it.

src/common/stream.c

index 7bfffe123aff059fb8031d4a40ceb119b40a59f0..1fb4a3295dfe8545cc057d4b1b5acf8c4eb965c9 100644 (file)
@@ -261,11 +261,17 @@ continue_input:
      * of a recorded stream, it is possible that a timeout
      * keystroke might be replayed.
      */
-    if (timeout != 0)
+    if (key == ZC_TIME_OUT)
     {
-       if (key == ZC_TIME_OUT)
+       if (timeout != 0)
+       {
            if (direct_call (routine) == 0)
                goto continue_input;
+       }
+       else
+       {
+           goto continue_input;
+       }
     }
 
     /* Handle hot keys */
@@ -342,11 +348,17 @@ continue_input:
      * of a recorded stream, it is possible that a timeout
      * keystroke might be replayed.
      */
-    if (timeout != 0)
+    if (key == ZC_TIME_OUT)
     {
-       if (key == ZC_TIME_OUT)
+       if (timeout != 0)
+       {
            if (direct_call (routine) == 0)
                goto continue_input;
+       }
+       else
+       {
+           goto continue_input;
+       }
     }
 
     /* Handle hot keys */