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
This commit is contained in:
aandrei 2002-05-09 01:30:06 +00:00
parent 7d916ad15b
commit 6d27c9c0ce

View file

@ -36,7 +36,7 @@ void Loki::Private::AtExitFn()
// Don't check errors - realloc with less memory
// can't fail
pTrackerArray = static_cast<TrackerArray>(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
////////////////////////////////////////////////////////////////////////////////