Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
fix macro save and load
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnut committed Jan 29, 2024
1 parent 5af0252 commit 95591c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Macrobot/Macrobot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void Macrobot::PlayerCheckpoint::apply(PlayerObject *player, bool fullRestore)

void Macrobot::save(const std::string& file)
{
std::ofstream f(Mod::get()->getSaveDir() / "macros" / file / ".gdr", std::ios::binary);
std::ofstream f(Mod::get()->getSaveDir() / "macros" / (file + ".gdr"), std::ios::binary);

std::string playerName = GJAccountManager::sharedState()->m_username;
GJGameLevel *level = GameManager::get()->getPlayLayer()->m_level;
Expand All @@ -327,7 +327,7 @@ void Macrobot::save(const std::string& file)

void Macrobot::load(const std::string& file)
{
std::ifstream f(Mod::get()->getSaveDir() / "macros" / file / ".gdr", std::ios::binary);
std::ifstream f(Mod::get()->getSaveDir() / "macros" / (file + ".gdr"), std::ios::binary);

f.seekg(0, std::ios::end);
size_t fileSize = f.tellg();
Expand Down

0 comments on commit 95591c4

Please sign in to comment.