SDL_BlitScaled: also prevent crash if dest width or height is negative

This commit is contained in:
Sylvain Becker 2020-12-29 17:29:31 +01:00
parent f08b9a5b6b
commit 80cf8a8b76
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect,
dstrect = &full_dst; dstrect = &full_dst;
} }
if (dstrect->w == 0 || dstrect->h == 0) { if (dstrect->w <= 0 || dstrect->h <= 0) {
return 0; return 0;
} }