diff --git a/sourcehook/sh_list.h b/sourcehook/sh_list.h index 247547e..3b368d9 100644 --- a/sourcehook/sh_list.h +++ b/sourcehook/sh_list.h @@ -254,7 +254,7 @@ public: } return end(); } - List & operator =(List &src) + List & operator =(const List &src) { clear(); iterator iter; diff --git a/sourcehook/sh_tinyhash.h b/sourcehook/sh_tinyhash.h index 14c80ec..efb5c1a 100644 --- a/sourcehook/sh_tinyhash.h +++ b/sourcehook/sh_tinyhash.h @@ -86,10 +86,18 @@ namespace SourceHook private: void _Clear() { + typename List::iterator iter, end; for (size_t i=0; iend(); + iter = m_Buckets[i]->begin(); + while (iter != end) + { + delete (*iter); + iter++; + } delete m_Buckets[i]; m_Buckets[i] = NULL; }