Renamed SDL_size_add_overflow() and SDL_size_mul_overflow()

This commit is contained in:
Sam Lantinga
2024-09-02 12:56:44 -07:00
parent fb7245fb93
commit eacf119923
11 changed files with 117 additions and 109 deletions

View File

@@ -175,7 +175,7 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
// .. and if it didn't, try to allocate as much room as we actually need.
if (len >= (int)buf_len) {
if (SDL_size_add_overflow(len, 1, &buf_len) == 0) {
if (SDL_size_add_check_overflow(len, 1, &buf_len)) {
message = (char *)SDL_malloc(buf_len);
if (message) {
len = SDL_RenderAssertMessage(message, buf_len, data);