Fix mod dependency sort
authorPerttu Ahola <celeron55@gmail.com>
Sun, 27 Nov 2011 11:19:20 +0000 (13:19 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:55 +0000 (19:13 +0200)
src/server.cpp

index f3e497ff171cf7229e6ab36259b37cf0448b51f3..4797965f288e1083177d01cb82991c417130ba57 100644 (file)
@@ -986,7 +986,7 @@ static core::list<ModSpec> getMods(core::list<std::string> &modspaths)
                mods_sorted.push_back(mod);
                for(core::list<ModSpec>::Iterator i = mods_unsorted.begin();
                                i != mods_unsorted.end(); i++){
-                       ModSpec mod2 = *i;
+                       ModSpec &mod2 = *i;
                        if(mod2.unsatisfied_depends.empty())
                                continue;
                        mod2.unsatisfied_depends.erase(mod.name);
@@ -998,7 +998,7 @@ static core::list<ModSpec> getMods(core::list<std::string> &modspaths)
        // Check unsatisfied dependencies
        for(core::list<ModSpec>::Iterator i = mods_unsorted.begin();
                        i != mods_unsorted.end(); i++){
-               ModSpec mod = *i;
+               ModSpec &mod = *i;
                if(mod.unsatisfied_depends.empty())
                        continue;
                errorstream<<"mod \""<<mod.name