From 267d102f6e9ce32878a6251d5136b176fdd2d49e Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 2 Aug 2019 00:35:05 +0300 Subject: [PATCH] fix copy+paste mistakes in commit 9b0e5c555c0f (CVE-2019-7637 fix): http://hg.libsdl.org/SDL/rev/9b0e5c555c0f made copy+paste mistakes which resulted in windows versions failing to set video mode. --- src/video/gapi/SDL_gapivideo.c | 2 +- src/video/windib/SDL_dibvideo.c | 2 +- src/video/windx5/SDL_dx5video.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/gapi/SDL_gapivideo.c b/src/video/gapi/SDL_gapivideo.c index 8a0648536..220260ab5 100644 --- a/src/video/gapi/SDL_gapivideo.c +++ b/src/video/gapi/SDL_gapivideo.c @@ -733,7 +733,7 @@ SDL_Surface *GAPI_SetVideoMode(_THIS, SDL_Surface *current, video->w = gapi->w = width; video->h = gapi->h = height; video->pitch = SDL_CalculatePitch(video); - if (!current->pitch) { + if (!video->pitch) { return(NULL); } diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c index 4663bb12f..81563c02f 100644 --- a/src/video/windib/SDL_dibvideo.c +++ b/src/video/windib/SDL_dibvideo.c @@ -675,7 +675,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current, video->w = width; video->h = height; video->pitch = SDL_CalculatePitch(video); - if (!current->pitch) { + if (!video->pitch) { return(NULL); } diff --git a/src/video/windx5/SDL_dx5video.c b/src/video/windx5/SDL_dx5video.c index 39fc4fc37..ec387fb97 100644 --- a/src/video/windx5/SDL_dx5video.c +++ b/src/video/windx5/SDL_dx5video.c @@ -1127,7 +1127,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current, video->w = width; video->h = height; video->pitch = SDL_CalculatePitch(video); - if (!current->pitch) { + if (!video->pitch) { return(NULL); }