[Scummvm-cvs-logs] CVS: scummvm/sword1 screen.cpp,1.37,1.38
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Feb 22 08:23:03 CET 2004
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26063
Modified Files:
screen.cpp
Log Message:
Free _screenBuf and _screenGrid before allocating new ones.
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/screen.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- screen.cpp 18 Jan 2004 05:52:04 -0000 1.37
+++ screen.cpp 22 Feb 2004 16:09:34 -0000 1.38
@@ -265,6 +265,10 @@
Logic::_scriptVars[SCROLL_OFFSET_X] = 0;
Logic::_scriptVars[SCROLL_OFFSET_Y] = 0;
}
+ if (_screenBuf)
+ free(_screenBuf);
+ if (_screenGrid)
+ free(_screenGrid);
_screenBuf = (uint8*)malloc(_scrnSizeX * _scrnSizeY);
_screenGrid = (uint8*)malloc(_gridSizeX * _gridSizeY);
memset(_screenGrid, 0, _gridSizeX * _gridSizeY);
More information about the Scummvm-git-logs
mailing list