From 3ecf9eb7419ad0c89716819b8dc51a423bfe1613 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Apr 2005 19:02:53 +0000 Subject: [PATCH] More fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1048 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ea3feb304..4cf4bd334 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3520,13 +3520,14 @@ bool LoadModule(const char* filename) } } bool extended = false; - if (factory.size() < MODCOUNT+1) + while (factory.size() <= MODCOUNT+1) { factory.push_back(NULL); // make an empty space + log(DEFAULT,"Extending factory[]"); bool extended = true; } - - factory[MODCOUNT+1] = new ircd_module(modfile); + ircd_module* a = new ircd_module(modfile); + factory[MODCOUNT+1] = a; if (factory[MODCOUNT+1]->LastError()) { log(DEFAULT,"Unable to load %s: %s",modfile,factory[MODCOUNT+1]->LastError()); @@ -3539,9 +3540,10 @@ bool LoadModule(const char* filename) if (factory[MODCOUNT+1]->factory) { bool mextended = false; - if (modules.size() < MODCOUNT+1) + while (modules.size() < MODCOUNT+1) { modules.push_back(NULL); + log(DEFAULT,"Extending modules[]"); bool extended = true; } modules[MODCOUNT+1] = factory[MODCOUNT+1]->factory->CreateModule(); -- 2.39.2