]> granicus.if.org Git - file/commitdiff
add the initial offset so that recursive "use" invocations work.
authorChristos Zoulas <christos@zoulas.com>
Tue, 26 Feb 2013 21:03:14 +0000 (21:03 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 26 Feb 2013 21:03:14 +0000 (21:03 +0000)
src/softmagic.c

index 22d1a2750f430989d07b31f7beef3fe247c4c11b..bd5f9a03474303a7f9eb11817c636c2abca9f549 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.159 2013/02/17 22:28:27 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.160 2013/02/26 18:24:43 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -1727,7 +1727,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
                        file_error(ms, 0, "cannot find entry `%s'", sbuf);
                        return -1;
                }
-               return match(ms, ml.magic, ml.nmagic, s, nbytes, offset,
+               return match(ms, ml.magic, ml.nmagic, s, nbytes, offset + o,
                    mode, text, flip, returnval);
 
        case FILE_NAME: