diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-19 05:47:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-19 23:04:53 +0300 |
commit | 80ba4766d8ce9861f6d026e791abc741e3fed0f4 (patch) | |
tree | 02d509ecd3ae384fba0b8d44a60c71033e3d31d3 /src/resources/db/itemfielddb.cpp | |
parent | 4526407e2001244a03674e57db8a6807cbbbe2b0 (diff) | |
download | plus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.gz plus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.bz2 plus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.xz plus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.zip |
Fix some memory leaks and add duplicate item fields check.
Diffstat (limited to 'src/resources/db/itemfielddb.cpp')
-rw-r--r-- | src/resources/db/itemfielddb.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/db/itemfielddb.cpp b/src/resources/db/itemfielddb.cpp index 17f9b61e1..0eeb7f901 100644 --- a/src/resources/db/itemfielddb.cpp +++ b/src/resources/db/itemfielddb.cpp @@ -86,6 +86,13 @@ static void loadFields(const XmlNodePtr groupNode, name.c_str()); continue; } + if (fields1.find(name) != fields1.end()) + { + reportAlways( + "Same field name detected: %s", + name.c_str()); + continue; + } fields1[name] = new ItemFieldType(name, description, sign); |