[Scummvm-cvs-logs] CVS: scummvm/sword2 resman.cpp,1.90,1.91

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Fri Apr 23 04:37:08 CEST 2004


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16977

Modified Files:
	resman.cpp 
Log Message:
I forgot to clear the reference counter when a resource is forcibly removed
and I may as well clear it when a resource is read from disk as well.


Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/resman.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- resman.cpp	23 Apr 2004 07:02:03 -0000	1.90
+++ resman.cpp	23 Apr 2004 11:36:06 -0000	1.91
@@ -463,6 +463,7 @@
 		// If it can't then old files will be ditched until it works.
 		_resList[res].ptr = _vm->_memory->memAlloc(len, res);
 		_resList[res].size = len;
+		_resList[res].refCount = 0;
 
 		file.read(_resList[res].ptr, len);
 
@@ -746,6 +747,7 @@
 	if (_resList[res].ptr) {
 		_vm->_memory->memFree(_resList[res].ptr);
 		_resList[res].ptr = NULL;
+		_resList[res].refCount = 0;
 	}
 }
 





More information about the Scummvm-git-logs mailing list