(svn r11118) -Fix: sample.cat can now be in a tar-file too, how nice!
authortruelight
Sat, 15 Sep 2007 16:01:34 +0000
changeset 8087 064305edb998
parent 8086 e4d64a7ab363
child 8088 7c1a4dd586ae
(svn r11118) -Fix: sample.cat can now be in a tar-file too, how nice!
src/sound.cpp
--- a/src/sound.cpp	Sat Sep 15 15:38:09 2007 +0000
+++ b/src/sound.cpp	Sat Sep 15 16:01:34 2007 +0000
@@ -30,6 +30,7 @@
 	uint i;
 
 	FioOpenFile(SOUND_SLOT, filename);
+	uint pos = FioGetPos();
 	count = FioReadDword() / 8;
 	FileEntry *fe = CallocT<FileEntry>(count);
 
@@ -42,11 +43,11 @@
 	_file_count = count;
 	_files = fe;
 
-	FioSeekTo(0, SEEK_SET);
+	FioSeekTo(pos, SEEK_SET);
 
 	for (i = 0; i != count; i++) {
 		fe[i].file_slot = SOUND_SLOT;
-		fe[i].file_offset = FioReadDword();
+		fe[i].file_offset = FioReadDword() + pos;
 		fe[i].file_size = FioReadDword();
 	}