From 6d27c9c0ce6f5ff78b91da0eec365d62b0f6f17c Mon Sep 17 00:00:00 2001 From: aandrei Date: Thu, 9 May 2002 01:30:06 +0000 Subject: [PATCH] Refixed bug in call to realloc git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@21 7ec92016-0320-0410-acc4-a06ded1c099a --- Singleton.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Singleton.cpp b/Singleton.cpp index d59015b..8cb69c2 100644 --- a/Singleton.cpp +++ b/Singleton.cpp @@ -36,7 +36,7 @@ void Loki::Private::AtExitFn() // Don't check errors - realloc with less memory // can't fail pTrackerArray = static_cast(std::realloc( - pTrackerArray, sizeof(T) * --elements)); + pTrackerArray, sizeof(*pTrackerArray) * --elements)); // Destroy the element delete pTop; } @@ -46,4 +46,5 @@ void Loki::Private::AtExitFn() // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! // January 10, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and // Eike Petersen +// May 08, 2002: Refixed bug in call to realloc ////////////////////////////////////////////////////////////////////////////////