mirror of https://github.com/encounter/SDL.git
SDL_BlitScaled: also prevent crash if dest width or height is negative
This commit is contained in:
parent
f08b9a5b6b
commit
80cf8a8b76
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue