If a + b would overflow, return -1.
Defined in SDL_stdinc.h
SDL_FORCE_INLINE int SDL_size_add_overflow (size_t a, size_t b, size_t *ret);| size_t | a | the first addend. |
| size_t | b | the second addend. |
| size_t * | ret | on non-overflow output, stores the addition result. |
(int) Returns false on overflow, true if result is added without overflow.
Otherwise store a + b via ret and return 0.
This function is available since SDL 2.24.0.