Skip to content

Commit

Permalink
#1356: fixed crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Feb 26, 2021
1 parent c6025d9 commit 7ce466c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/studio/screens/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,11 @@ static void* getDemoCart(Console* console, ScriptLang script, s32* size)

static void setCartName(Console* console, const char* name, const char* path)
{
strcpy(console->rom.name, name);
strcpy(console->rom.path, path);
if(console->rom.name != name)
strcpy(console->rom.name, name);

if(console->rom.path != path)
strcpy(console->rom.path, path);
}

static void onConsoleLoadDemoCommandConfirmed(Console* console, const char* param)
Expand Down

0 comments on commit 7ce466c

Please sign in to comment.