EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use dmDriverExtra currently, but this implementation detail should not be relied on.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- programs/explorer/desktop.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 691db5c8bda..6f1ff54c143 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -889,6 +889,7 @@ static void initialize_display_settings(void)
/* Store current display mode in the registry */ ddW.cb = sizeof(ddW); + memset(&dmW, 0, sizeof(dmW)); dmW.dmSize = sizeof(dmW); while (EnumDisplayDevicesW( NULL, i++, &ddW, 0 )) {