[Scummvm-cvs-logs] CVS: residual smush.cpp,1.29,1.30

James Brown ender at users.sourceforge.net
Fri Mar 19 04:06:07 CET 2004


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

Modified Files:
	smush.cpp 
Log Message:
Oops. Don't close the LAB file handle :)


Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- smush.cpp	19 Mar 2004 10:51:04 -0000	1.29
+++ smush.cpp	19 Mar 2004 11:56:00 -0000	1.30
@@ -242,7 +242,9 @@
 
 bool zlibFile::open(const char *filename) {
 	char flags = 0;
+	printf("allocing: ");
 	inBuf = (char*)calloc(1, 16385);
+	printf("alloced\n");
 
 	if (_handle) {
 		warning("File %s already opened", filename);
@@ -252,6 +254,8 @@
 	if (filename == NULL || *filename == 0)
 		return false;
 
+	warning("Opening zlibFile %s...", filename);
+
 	_handle = ResourceLoader::instance()->openNewStream(filename);
 	if (!_handle) {
 		warning("zlibFile %s not found", filename);
@@ -270,7 +274,6 @@
 	if ((flags & 0x08) != 0) {					// Orig. Name
 		do {
 			fread(inBuf, 1, sizeof(char), _handle);
-			printf("%c", inBuf[0]);
 		} while(inBuf[0] != 0);
 	}
 
@@ -290,14 +293,14 @@
 	stream.avail_in = 0;
 	stream.avail_out = 16384;
 
-	warning("zlibFile %s opened", filename);
+	warning("Opened zlibFile %s...", filename);
+
 	return true;
 }
 
 void zlibFile::close() {
-	if (_handle)
-		fclose(_handle);
 	_handle = NULL;
+	printf("Closing..\n");
 	free(inBuf);
 }
 





More information about the Scummvm-git-logs mailing list