changeset 51576:df2c9d815bb3

(x_dispatch_event): Don't pass uninitialized data to kbd_buffer_store_event.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 15 Jun 2003 21:20:55 +0000
parents 45724e359a61
children f624d43a48fb
files src/xterm.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sun Jun 15 21:18:03 2003 +0000
+++ b/src/xterm.c	Sun Jun 15 21:20:55 2003 +0000
@@ -6989,10 +6989,14 @@
 {
   struct x_display_info *dpyinfo;
   struct input_event bufp[10];
-  struct input_event *bufpp = bufp;
+  struct input_event *bufpp;
   int numchars = 10;
   int finish = X_EVENT_NORMAL;
 
+  for (bufpp = bufp; bufpp != bufp + 10; bufpp++)
+    EVENT_INIT (*bufpp);
+  bufpp = bufp;
+
   for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
     if (dpyinfo->display == display)
       break;