Remove checks on destination scaling size (see bug #5510)

main
Sylvain Becker 2021-01-29 20:34:20 +01:00
parent 8d95aba174
commit d6a6662fa1
2 changed files with 4 additions and 6 deletions

View File

@ -94,9 +94,8 @@ SDL_UpperSoftStretch(SDL_Surface * src, const SDL_Rect * srcrect,
return 0; return 0;
} }
if (srcrect->w > SDL_MAX_UINT16 || srcrect->h > SDL_MAX_UINT16 || if (srcrect->w > SDL_MAX_UINT16 || srcrect->h > SDL_MAX_UINT16) {
dstrect->w > SDL_MAX_UINT16 || dstrect->h > SDL_MAX_UINT16) { return SDL_SetError("Source size too large for scaling");
return SDL_SetError("Too large size for scaling");
} }
/* Lock the destination if it's in hardware */ /* Lock the destination if it's in hardware */

View File

@ -931,9 +931,8 @@ SDL_PrivateLowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect,
SDL_COPY_COLORKEY SDL_COPY_COLORKEY
); );
if (srcrect->w > SDL_MAX_UINT16 || srcrect->h > SDL_MAX_UINT16 || if (srcrect->w > SDL_MAX_UINT16 || srcrect->h > SDL_MAX_UINT16) {
dstrect->w > SDL_MAX_UINT16 || dstrect->h > SDL_MAX_UINT16) { return SDL_SetError("Source size too large for scaling");
return SDL_SetError("Too large size for scaling");
} }
if (!(src->map->info.flags & SDL_COPY_NEAREST)) { if (!(src->map->info.flags & SDL_COPY_NEAREST)) {