ref: 8b1e1b01ceea3d5b7cb5fa2a781a883ccfbe44af
parent: cfb81dff3e9a09bd943bec1a814f35c41432c356
author: Chris Moeller <[email protected]>
date: Mon Jan 11 04:00:26 EST 2010
{11/29/2006 6:01:06 AM}2006-10-12 06:28 UTC - kode54 - STM reader checks for more values after the song name, reports the correct order list size, and ignores samples which are shorter than four bytes or have a default volume of zero. git-tfs-id: [http://localhost:8080/tfs/DefaultCollection/]$/foobar2000/files/plugins.root;C137
--- a/dumb/src/it/readstm.c
+++ b/dumb/src/it/readstm.c
@@ -61,7 +61,7 @@
dumbfile_skip( f, 6 );
- if ( sample->length < 2 /*|| ! sample->default_volume*/ ) {
+ if ( sample->length < 4 || !sample->default_volume ) {
/* Looks like no-existy. */
sample->flags &= ~IT_SAMPLE_EXISTS;
sample->length = 0;
@@ -220,7 +220,8 @@
sigdata->name[20] = 0;
dumbfile_getnc(tracker_name, 8, f);
- if ( dumbfile_getc(f) != 0x1A )
+ n = dumbfile_getc(f);
+ if ( n != 0x02 && n != 0x1A && n != 0x1B )
{
free( sigdata );
return NULL;
@@ -321,7 +322,7 @@
_dumb_it_unload_sigdata( sigdata );
return NULL;
}
- sigdata->n_orders = n;
+ sigdata->n_orders = n + 1;
for ( n = 0; n < 128; ++n ) {
if ( sigdata->order[ n ] >= 99 ) sigdata->order[ n ] = 0xFF;