Skip to content

Commit

Permalink
Merge pull request #336 from linkanon/master
Browse files Browse the repository at this point in the history
fixed card storage retardedness
  • Loading branch information
linkanon authored Jun 5, 2021
2 parents 85ba080 + 99dab90 commit 16c29d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions AAUnlimited/Files/PersistentStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ std::map<std::wstring, PersistentStorage::ClassStorage> PersistentStorage::Class

picojson::value PersistentStorage::ClassStorage::get(std::string key)
{
return data[key];
auto ret = data.find(key);
return ret == data.end() ? picojson::value() : ret->second;
}

PersistentStorage::ClassStorage* PersistentStorage::current() {
PersistentStorage::ClassStorage* PersistentStorage::current()
{
return ClassStorage::getStorage(Shared::GameState::getCurrentClassSaveName());
}

Expand Down

0 comments on commit 16c29d6

Please sign in to comment.