Skip to content

Commit

Permalink
fix_cleo_save_clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Dec 7, 2024
1 parent 3be04a4 commit 97fef47
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/CScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,15 +1078,14 @@ namespace CLEO
void CScriptEngine::LoadState(int saveSlot)
{
memset(CleoVariables, 0, sizeof(CleoVariables));

if(saveSlot == -1) return;

auto saveFile = FS::path(Filepath_Cleo).append(StringPrintf("cleo_saves\\cs%d.sav", saveSlot)).string();

safe_info = nullptr;
stopped_info = nullptr;
safe_header.n_saved_threads = safe_header.n_stopped_threads = 0;

if(saveSlot == -1) return; // new game started

auto saveFile = FS::path(Filepath_Cleo).append(StringPrintf("cleo_saves\\cs%d.sav", saveSlot)).string();

// load cleo saving file
try
{
Expand Down

0 comments on commit 97fef47

Please sign in to comment.