diff options
author | Adam <Adam@anope.org> | 2012-05-10 17:53:53 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-05-10 17:53:53 -0400 |
commit | 9370b063d0d8ecdd479370ee8c1d7946fbcad4be (patch) | |
tree | 6203d66dc991e310b2c071ec4dc812c7566c8a11 /src | |
parent | d5ffae0e46a822ea358a8a87ea6910c5f2532bf7 (diff) |
Fixed crash on access del + valgrind errors
Diffstat (limited to 'src')
-rw-r--r-- | src/access.cpp | 3 | ||||
-rw-r--r-- | src/misc.cpp | 2 | ||||
-rw-r--r-- | src/regchannel.cpp | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/access.cpp b/src/access.cpp index 189e275a3..40e53a305 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -118,8 +118,7 @@ Serializable* ChanAccess::unserialize(Serializable *obj, Serialize::Data &data) if (obj) access = anope_dynamic_static_cast<ChanAccess *>(obj); else - access = const_cast<ChanAccess *>(aprovider->Create()); - access->provider = aprovider; + access = aprovider->Create(); access->ci = ci; data["mask"] >> access->mask; data["creator"] >> access->creator; diff --git a/src/misc.cpp b/src/misc.cpp index fbc110ef3..e5ad71d45 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -669,7 +669,7 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case } } - if (mask[m] == '*') + if (m < mask_len && mask[m] == '*') ++m; return m == mask_len; diff --git a/src/regchannel.cpp b/src/regchannel.cpp index b113dfb2e..99554a6d5 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -638,7 +638,6 @@ void ChannelInfo::EraseAccess(const ChanAccess *taccess) { if (this->GetAccess(i) == taccess) { - this->GetAccess(i)->destroy(); this->EraseAccess(i); break; } |