From 1734ab5bc40e8d1f32020ec4c2c293b4e950b342 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Wed, 13 Sep 2023 07:33:36 -0400 Subject: [PATCH] Match ~MxList --- LEGO1/mxlist.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 112780b6..9ace7bf7 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -30,6 +30,8 @@ class MxListParent : public MxCore m_count = 0; m_customDestructor = Destroy; } + // OFFSET: LEGO1 0x1001cdd0 + virtual ~MxListParent() {} // OFFSET: LEGO1 0x1001cd30 static void Destroy(T *) {}; @@ -60,12 +62,13 @@ class MxList : protected MxListParent }; template -// OFFSET: LEGO1 0x1001cfe0 +// OFFSET: LEGO1 0x1001ce20 MxList::~MxList() { - MxListEntry *t = m_first; + for (MxListEntry *t = m_first;;) { + if (!t) + break; - while (t) { MxListEntry *next = t->m_next; m_customDestructor(t->m_obj); delete t;