From fba32ee21faeb497549e2feabd6598c23e837192 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 14 Oct 2020 23:01:04 +0300 Subject: [PATCH] OS2_VideoInit: zero the stSDLDisplay and stSDLDisplayMode variables Fixes testdisplayinfo.exe crashing in SDL2-2.0.13. (How it did work before?..) --- src/video/os2/SDL_os2video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/os2/SDL_os2video.c b/src/video/os2/SDL_os2video.c index 662c67f22..60c112a89 100644 --- a/src/video/os2/SDL_os2video.c +++ b/src/video/os2/SDL_os2video.c @@ -1555,6 +1555,8 @@ static int OS2_VideoInit(_THIS) return SDL_SetError( "Video mode query failed." ); } + SDL_zero(stSDLDisplay); SDL_zero(stSDLDisplayMode); + stSDLDisplayMode.format = _getSDLPixelFormat( stVOInfo.ulBPP, stVOInfo.fccColorEncoding ); stSDLDisplayMode.w = stVOInfo.ulHorizResolution;