mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-23 21:55:12 +00:00
assert: Allow messages of any length.
Messages are no longer truncated to SDL_MAX_LOG_MESSAGE.
This commit is contained in:
parent
888899244c
commit
ca26df3404
|
@ -179,9 +179,9 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
|
||||||
data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
|
data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
|
||||||
data->condition);
|
data->condition);
|
||||||
|
|
||||||
/* .. and if it didn't, allocate a bigger buffer and try again */
|
/* .. and if it didn't, allocate as much room as we actually need. */
|
||||||
if (len >= buf_len && message == stack_buf) {
|
if (len >= buf_len && message == stack_buf) {
|
||||||
buf_len = SDL_MAX_LOG_MESSAGE;
|
buf_len = len + 1;
|
||||||
message = (char *)SDL_malloc(buf_len);
|
message = (char *)SDL_malloc(buf_len);
|
||||||
if (!message) {
|
if (!message) {
|
||||||
/* Uh oh, we're in real trouble now... */
|
/* Uh oh, we're in real trouble now... */
|
||||||
|
|
Loading…
Reference in a new issue