forked from libsdl-org/SDL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDL_CalculateRGBSize, SDL_CalculateYUVSize: set the error indicator
These functions historically didn't set the error indicator on overflow. Before commit 447b508 "error: SDL's allocators now call SDL_OutOfMemory on error", their callers would call SDL_OutOfMemory() instead, which was assumed to be close enough in meaning: "that's a silly amount of memory that would overflow size_t" is similar to "that's more memory than is available". Now that responsibility for calling SDL_OutOfMemory() has been pushed down into SDL_calloc() and friends, the functions that check for overflows might as well set more specific errors. Signed-off-by: Simon McVittie <[email protected]>
- Loading branch information
Showing
3 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters