Possible fix for init_mario_after_warp() crash
This commit is contained in:
parent
7905624cb5
commit
ba53c06b52
|
@ -392,8 +392,9 @@ void set_mario_initial_action(struct MarioState *m, u32 spawnType, u32 actionArg
|
|||
|
||||
void init_mario_after_warp(void) {
|
||||
struct ObjectWarpNode *spawnNode = area_get_warp_node(sWarpDest.nodeId);
|
||||
if (spawnNode == NULL) { spawnNode = gCurrentArea->warpNodes; }
|
||||
if (spawnNode == NULL) { return; }
|
||||
if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = &gCurrentArea->warpNodes[0xFA]; }
|
||||
if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = &gCurrentArea->warpNodes[0x00]; }
|
||||
if (spawnNode == NULL || spawnNode->object == NULL) { return; }
|
||||
u32 marioSpawnType = get_mario_spawn_type(spawnNode->object);
|
||||
|
||||
if (gMarioState->action != ACT_UNINITIALIZED) {
|
||||
|
|
|
@ -99,7 +99,7 @@ void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolu
|
|||
|
||||
char m64path[SYS_MAX_PATH] = { 0 };
|
||||
if (snprintf(m64path, SYS_MAX_PATH-1, "sound/%s.m64", m64Name) < 0) {
|
||||
LOG_LUA("Could not find m64 at path: %s", m64path);
|
||||
LOG_LUA("Could not concat m64path: %s", m64path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue