diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-22 13:09:25 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-22 13:16:30 +0200 |
commit | bf6e38872829f87ff408f294184da14c8c24bfd4 (patch) | |
tree | f569a61013932b0988e90e83dbc553e93457639a /src/game-server/statusmanager.cpp | |
parent | 05130de24bf68d6ca427cbc126a03159ca777e5d (diff) | |
download | manaserv-bf6e38872829f87ff408f294184da14c8c24bfd4.tar.gz manaserv-bf6e38872829f87ff408f294184da14c8c24bfd4.tar.bz2 manaserv-bf6e38872829f87ff408f294184da14c8c24bfd4.tar.xz manaserv-bf6e38872829f87ff408f294184da14c8c24bfd4.zip |
Made the servers check for positive id in xml db loading.
Also fixed a memleak when loading an invalid monster attack.
Resolves: Mana-Mantis #215.
Reviewed-by: Thorbjorn.
Diffstat (limited to 'src/game-server/statusmanager.cpp')
-rw-r--r-- | src/game-server/statusmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game-server/statusmanager.cpp b/src/game-server/statusmanager.cpp index 21c396e7..008e9827 100644 --- a/src/game-server/statusmanager.cpp +++ b/src/game-server/statusmanager.cpp @@ -65,10 +65,11 @@ void StatusManager::reload() continue; int id = XML::getProperty(node, "id", 0); - if (id == 0) + if (id < 1) { - LOG_WARN("Status Manager: An (ignored) Status has no ID in " - << statusReferenceFile << "!"); + LOG_WARN("Status Manager: The status ID: " << id << " in " + << statusReferenceFile + << " is invalid and will be ignored."); continue; } |