فهرست منبع

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

Sylvain Becker 4 سال پیش
والد
کامیت
80cf8a8b76
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/video/SDL_stretch.c

+ 1 - 1
src/video/SDL_stretch.c

@@ -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;
     }