mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
Renamed SDL_size_add_overflow() and SDL_size_mul_overflow()
This commit is contained in:
parent
fb7245fb93
commit
eacf119923
11 changed files with 117 additions and 109 deletions
|
@ -480,7 +480,7 @@ void SDL_LogMessageV(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_S
|
|||
}
|
||||
|
||||
// If message truncated, allocate and re-render
|
||||
if (len >= sizeof(stack_buf) && SDL_size_add_overflow(len, 1, &len_plus_term) == 0) {
|
||||
if (len >= sizeof(stack_buf) && SDL_size_add_check_overflow(len, 1, &len_plus_term)) {
|
||||
// Allocate exactly what we need, including the zero-terminator
|
||||
message = (char *)SDL_malloc(len_plus_term);
|
||||
if (!message) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue