diff options
| author | Po Lu | 2022-08-06 14:50:04 +0800 |
|---|---|---|
| committer | Po Lu | 2022-08-06 14:51:08 +0800 |
| commit | 28c01bd4841be69d01b6db661917f1be9830cc3d (patch) | |
| tree | c0f1fb3791bf83437dbef7cc5b1986486c0ba014 /src/xterm.c | |
| parent | 564571f712fcf0ffcb93eeca67f7716263c9def5 (diff) | |
| download | emacs-28c01bd4841be69d01b6db661917f1be9830cc3d.tar.gz emacs-28c01bd4841be69d01b6db661917f1be9830cc3d.zip | |
Correctly initialize values after a new device is enabled
* src/xterm.c (handle_one_xevent): Initialize new device to
zero. (bug#57011)
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index b1e564a9232..8f84edc63ee 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -22144,6 +22144,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 22144 | dpyinfo->devices | 22144 | dpyinfo->devices |
| 22145 | = xrealloc (dpyinfo->devices, (sizeof *dpyinfo->devices | 22145 | = xrealloc (dpyinfo->devices, (sizeof *dpyinfo->devices |
| 22146 | * ++dpyinfo->num_devices)); | 22146 | * ++dpyinfo->num_devices)); |
| 22147 | memset (dpyinfo->devices + dpyinfo->num_devices - 1, | ||
| 22148 | 0, sizeof *dpyinfo->devices); | ||
| 22147 | device = &dpyinfo->devices[dpyinfo->num_devices - 1]; | 22149 | device = &dpyinfo->devices[dpyinfo->num_devices - 1]; |
| 22148 | xi_populate_device_from_info (device, info); | 22150 | xi_populate_device_from_info (device, info); |
| 22149 | } | 22151 | } |