From 8d224ea21230355c8518963fc4df5abfbc58e5c1 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Wed, 4 Dec 2002 16:05:24 +0000 Subject: [PATCH] Fixed memory leak, from PhracturedBlue. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@318 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 33e0c184a..b67bcaf3b 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ 0.2: +- Fixed memory leak in _ReleaseCelData, from PhracturedBlue. - Fixed mutex deadlock in 3do_blt.c, from tamlin - 'additional credits' amount for Melnorme correct now, by Windplume. - Spheres of influence now move correctly in starmap, from l0ci@hotmail.com diff --git a/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c b/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c index e5c926897..005dd5d8c 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c +++ b/sc2/src/sc2code/libs/graphics/sdl/3do_getbody.c @@ -334,7 +334,7 @@ _ReleaseCelData (MEM_HANDLE handle) int cel_ct; FRAMEPTR FramePtr; - cel_ct = INDEX_GET (DrawablePtr->FlagsAndIndex); + cel_ct = INDEX_GET (DrawablePtr->FlagsAndIndex) + 1; FramePtr = &DrawablePtr->Frame[cel_ct]; while (--FramePtr, cel_ct--)