From ef9fc69bb4602cfdc587d0e7fc5dfcb5973ee490 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 27 Jun 2015 16:14:58 -0400 Subject: [PATCH] Fix incorrectly saving and loading item and terrain abilities (as well as a few other enumerated types) --- src/classes/estreams.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/classes/estreams.cpp b/src/classes/estreams.cpp index 659f11770..370f0b0e9 100644 --- a/src/classes/estreams.cpp +++ b/src/classes/estreams.cpp @@ -46,9 +46,11 @@ class cEnumLookup { public: cEnumLookup(const std::initializer_list strings) : root(0) { size_t i = 0; - for(std::string str : strings) + for(std::string str : strings) { if(!str.empty()) - insert(str, i++); + insert(str, i); + i++; + } } void insert(const std::string& str, unsigned long val) { size_t i = 0;