mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Check for SDL_strdup
failure in parseComments
Just in case it happens. Comments aren't really important to the game (at worst a track will just loop in the wrong place) so it's fine to carry on here and ignore all comments if this happens.
This commit is contained in:
parent
27e04e9dbf
commit
fb13e652fa
1 changed files with 8 additions and 0 deletions
|
@ -484,6 +484,14 @@ end:
|
|||
for (int i = 0; i < comment_list_length; i++)
|
||||
{
|
||||
char* param = SDL_strdup(comments[i]);
|
||||
if (param == NULL)
|
||||
{
|
||||
vlog_error(
|
||||
"Could not allocate memory to parse '%s'. Ignoring comments.",
|
||||
comments[i]
|
||||
);
|
||||
break;
|
||||
}
|
||||
char* argument = param;
|
||||
char* value = SDL_strchr(param, '=');
|
||||
if (value == NULL)
|
||||
|
|
Loading…
Reference in a new issue