mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-07 02:16:26 +00:00
SDL_BlitScaled: also prevent crash if dest width or height is negative
This commit is contained in:
@@ -260,7 +260,7 @@ SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
dstrect = &full_dst;
|
||||
}
|
||||
|
||||
if (dstrect->w == 0 || dstrect->h == 0) {
|
||||
if (dstrect->w <= 0 || dstrect->h <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user