[Scummvm-cvs-logs] SF.net SVN: scummvm:[50608] scummvm/trunk/engines/kyra/sound_towns.cpp

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sat Jul 3 02:06:54 CEST 2010


Revision: 50608
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50608&view=rev
Author:   athrxx
Date:     2010-07-03 00:06:54 +0000 (Sat, 03 Jul 2010)

Log Message:
-----------
KYRA/PC98 Audio: fix invalid mem access

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_towns.cpp

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2010-07-02 23:12:17 UTC (rev 50607)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2010-07-03 00:06:54 UTC (rev 50608)
@@ -1866,9 +1866,10 @@
 		if (cmd < 0xf0) {
 			tmp++;
 		} else if (cmd == 0xff) {
-			if (READ_LE_UINT16(tmp))
+			if (READ_LE_UINT16(tmp)) {
 				_drv->_looping |= _idFlag;
-			else
+				tmp += _drv->_opnFxCmdLen[cmd - 240];
+			} else
 				loop = false;
 		} else if (cmd == 0xf6) {
 			// reset repeat section countdown
@@ -2512,7 +2513,7 @@
 		uint8 cmd = *tmp++;
 		if (cmd < 0xf0) {
 			tmp++;
-		} else if (cmd == 0xff && !*tmp) {
+		} else if (cmd == 0xff) {
 			loop = false;
 		} else if (cmd == 0xf6) {
 			// reset repeat section countdown
@@ -3080,7 +3081,7 @@
 	for (int i = 0; i < _numChan; i++) {
 		for (int ii = 0; ii < 4; ii++)
 			_chanInternal[i].opr[ii]->reset();
-		memset(&_chanInternal[i].feedbuf, 0, 3);
+		memset(_chanInternal[i].feedbuf, 0, 3);
 		_chanInternal[i].algorithm = 0;
 		_chanInternal[i].frqTemp = 0;
 		_chanInternal[i].enableLeft = _chanInternal[i].enableRight = true;


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