Fix Conditional jump or move depends on uninitialised value(s)

eg ./testsprite2 --trackmem
This commit is contained in:
Sylvain 2022-12-02 21:11:33 +01:00
parent 07d6d116ed
commit 0a91a793cf
No known key found for this signature in database
GPG key ID: 5F87E02E5BC0939E

View file

@ -233,6 +233,12 @@ void SDLTest_LogAllocations()
return;
}
message = SDL_realloc_orig(NULL, 1);
if (!message) {
return;
}
*message = 0;
#define ADD_LINE() \
message_size += (SDL_strlen(line) + 1); \
tmp = (char *)SDL_realloc_orig(message, message_size); \