Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/base/savegame.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/base/savegame.cc b/src/game/base/savegame.cc
index ca911ec..789bdb1 100644
--- a/src/game/base/savegame.cc
+++ b/src/game/base/savegame.cc
@@ -152,13 +152,17 @@ void SaveGame::load_game(core::Player *player, filesystem::IniFile & inifile)
} else if (inifile.in_section("item")) {
if (inifile.got_key_label("type", itemtype)) {
- continue;
+ core::InfoType *item_infotype = core::InfoType::find(itemtype);
+ if (!itemtype.size() || !item_infotype) {
+ inifile.unknown_error("invalid item type '" + itemtype +"'");
+ continue;
+ }
} else if (inifile.got_key_label("label", itemlabel)) {
if (!item && ship) {
core::InfoType *item_infotype = core::InfoType::find(itemtype);
if (!itemtype.size() || !item_infotype) {
- inifile.unknown_error("invalid item type '" + itemtype +"'");
+ // inifile.unknown_error("invalid item type '" + itemtype +"'");
continue;
}
@@ -167,6 +171,7 @@ void SaveGame::load_game(core::Player *player, filesystem::IniFile & inifile)
inifile.unknown_error("invalid item label '" + itemlabel +"'");
continue;
}
+
item = new core::Item(item_info);
ship->inventory()->add(item);
}