projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
564571f
)
Correctly initialize values after a new device is enabled
author
Po Lu
<luangruo@yahoo.com>
Sat, 6 Aug 2022 06:50:04 +0000
(14:50 +0800)
committer
Po Lu
<luangruo@yahoo.com>
Sat, 6 Aug 2022 06:51:08 +0000
(14:51 +0800)
* src/xterm.c (handle_one_xevent): Initialize new device to
zero. (bug#57011)
src/xterm.c
patch
|
blob
|
history
diff --git
a/src/xterm.c
b/src/xterm.c
index b1e564a92328c6db8eb4c356a13be04cceecc1d9..8f84edc63eed047dbf981a6f0a95a3fa723ad5cd 100644
(file)
--- a/
src/xterm.c
+++ b/
src/xterm.c
@@
-22144,6
+22144,8
@@
handle_one_xevent (struct x_display_info *dpyinfo,
dpyinfo->devices
= xrealloc (dpyinfo->devices, (sizeof *dpyinfo->devices
* ++dpyinfo->num_devices));
+ memset (dpyinfo->devices + dpyinfo->num_devices - 1,
+ 0, sizeof *dpyinfo->devices);
device = &dpyinfo->devices[dpyinfo->num_devices - 1];
xi_populate_device_from_info (device, info);
}