]> granicus.if.org Git - file/commitdiff
*** empty log message ***
authorChristos Zoulas <christos@zoulas.com>
Fri, 28 Apr 1995 19:13:08 +0000 (19:13 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 28 Apr 1995 19:13:08 +0000 (19:13 +0000)
src/softmagic.c

index 1efc367ec5d762a0899ce2be3dab60c6f355c3b6..92d4d773a0938541967c9694d9e82306dd3c2a5e 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef        lint
 static char *moduleid = 
-       "@(#)$Id: softmagic.c,v 1.28 1995/04/28 17:29:13 christos Exp $";
+       "@(#)$Id: softmagic.c,v 1.29 1995/04/28 19:13:08 christos Exp $";
 #endif /* lint */
 
 static int match       __P((unsigned char *, int));
@@ -287,7 +287,7 @@ struct magic *m;
 int nbytes;
 {
        long offset = m->offset;
-       long diff = (offset + sizeof(union VALUETYPE)) - nbytes;
+       long diff = nbytes - (offset + sizeof(union VALUETYPE));
        if (diff >= 0)
                memcpy(p, s + offset, sizeof(union VALUETYPE));
        else {