diff --git a/lib/CArtHandler.cpp b/lib/CArtHandler.cpp index 724fa7209..9311e3b30 100644 --- a/lib/CArtHandler.cpp +++ b/lib/CArtHandler.cpp @@ -924,7 +924,9 @@ void CArtHandler::addBonuses() } cfg.Vector().push_back(jn); } - JsonWriter(std::ofstream("config/artifacts.json"), cfg); + + std::ofstream artconfigOutput("config/artifacts.json"); + JsonWriter(artconfigOutput, cfg); } void CArtHandler::clear()