shithub: dumb

Download patch

ref: 41014790720378a31106ea18e27bcb2d45fcc2a5
parent: a87eac09ccd72ca7257d6102835e8b94bfac6583
author: Chris Moeller <kode54@gmail.com>
date: Mon Jan 11 04:00:42 EST 2010

{1/24/2007 5:55:02 AM}2007-01-21 17:43 UTC - kode54
- XM reader now ignores sample header length, as Sk@le Tracker fills this with nonsense.

git-tfs-id: [http://localhost:8080/tfs/DefaultCollection/]$/foobar2000/files/plugins.root;C163

--- a/dumb/src/it/readxm.c
+++ b/dumb/src/it/readxm.c
@@ -373,11 +373,12 @@
 
 	if (extra->n_samples) {
 		/* sample header size */
-		i = dumbfile_igetl(f);
+		dumbfile_skip(f, 4); // XXX can't be trusted, as there are trackers that write the wrong value here
+		/*i = dumbfile_igetl(f);
 		if (i && i != 0x28) { // XXX some crap with 0 here
 			TRACE("XM error: unexpected sample header size\n");
 			return -1;
-		}
+		}*/
 
 		/* sample map */
 		for (i = 0; i < 96; i++) {