[Scummvm-cvs-logs] SF.net SVN: scummvm:[35433] scummvm/trunk/graphics

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Fri Dec 19 02:45:56 CET 2008


Revision: 35433
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35433&view=rev
Author:   drmccoy
Date:     2008-12-19 01:45:55 +0000 (Fri, 19 Dec 2008)

Log Message:
-----------
Making curPos an uint32, so that it won't overflow anymore

Modified Paths:
--------------
    scummvm/trunk/graphics/smk_player.cpp
    scummvm/trunk/graphics/smk_player.h

Modified: scummvm/trunk/graphics/smk_player.cpp
===================================================================
--- scummvm/trunk/graphics/smk_player.cpp	2008-12-19 01:01:07 UTC (rev 35432)
+++ scummvm/trunk/graphics/smk_player.cpp	2008-12-19 01:45:55 UTC (rev 35433)
@@ -569,7 +569,7 @@
 			if (_header.audioInfo[i].isCompressed) {
 				// Compressed audio (Huffman DPCM encoded)
 				queueCompressedBuffer(soundBuffer, chunkSize, dataSizeUnpacked, i);
-				delete soundBuffer;
+				delete[] soundBuffer;
 			} else {
 				// Uncompressed audio (PCM)
 				_audioStream->queueBuffer(soundBuffer, chunkSize);
@@ -745,8 +745,8 @@
 	return ++_currentSMKFrame < _header.frames;
 }
 
-void SMKPlayer::queueCompressedBuffer(byte *buffer, int bufferSize,
-		int unpackedSize, int streamNum) {
+void SMKPlayer::queueCompressedBuffer(byte *buffer, uint32 bufferSize,
+		uint32 unpackedSize, int streamNum) {
 
 	BitStream audioBS(buffer, bufferSize);
 	bool dataPresent = audioBS.getBit();
@@ -763,7 +763,7 @@
 
 	byte *unpackedBuffer = new byte[unpackedSize + numBytes];
 	byte *curPointer = unpackedBuffer;
-	uint16 curPos = 0;
+	uint32 curPos = 0;
 
 	SmallHuffmanTree *audioTrees[4];
 	for (int k = 0; k < numBytes; k++)

Modified: scummvm/trunk/graphics/smk_player.h
===================================================================
--- scummvm/trunk/graphics/smk_player.h	2008-12-19 01:01:07 UTC (rev 35432)
+++ scummvm/trunk/graphics/smk_player.h	2008-12-19 01:45:55 UTC (rev 35433)
@@ -143,7 +143,7 @@
 	void unpackPalette();
 	// Possible runs of blocks
 	uint getBlockRun(int index) { return (index <= 58) ? index + 1 : 128 << (index - 59); }
-	void queueCompressedBuffer(byte *buffer, int bufferSize, int unpackedSize, int streamNum);
+	void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize, int streamNum);
 
 	struct AudioInfo {
 		bool isCompressed;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list