]> granicus.if.org Git - file/commitdiff
Don't hardcode the +10 offset in the source.
authorChristos Zoulas <christos@zoulas.com>
Sat, 14 Feb 2015 18:43:12 +0000 (18:43 +0000)
committerChristos Zoulas <christos@zoulas.com>
Sat, 14 Feb 2015 18:43:12 +0000 (18:43 +0000)
src/softmagic.c

index 2cb7ef0701227c545433c57edb096bce047021a2..ad663af3d5a39d3b569507bcf8e43622c605be98 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.212 2015/01/24 22:11:25 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.213 2015/02/14 18:43:12 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -1567,7 +1567,9 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
                        offset = ((((offset >>  0) & 0x7f) <<  0) |
                                 (((offset >>  8) & 0x7f) <<  7) |
                                 (((offset >> 16) & 0x7f) << 14) |
-                                (((offset >> 24) & 0x7f) << 21)) + 10;
+                                (((offset >> 24) & 0x7f) << 21));
+                       if ((ms->flags & MAGIC_DEBUG) != 0)
+                               fprintf(stderr, "id3 offs=%u\n", offset);
                        break;
                default:
                        break;