From: Christos Zoulas Date: Fri, 25 Mar 2005 18:03:18 +0000 (+0000) Subject: Fix reversed logic in byte-swapping code. X-Git-Tag: FILE5_05~821 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c64a891757dc10210ca274dd8a1babad9acf0eb0;p=file Fix reversed logic in byte-swapping code. --- diff --git a/src/apprentice.c b/src/apprentice.c index 16c6e847..f93ed361 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -45,7 +45,7 @@ #endif #ifndef lint -FILE_RCSID("@(#)$Id: apprentice.c,v 1.83 2005/03/06 05:58:22 christos Exp $") +FILE_RCSID("@(#)$Id: apprentice.c,v 1.84 2005/03/25 18:03:18 christos Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -1242,7 +1242,7 @@ bs1(struct magic *m) m->cont_level = swap2(m->cont_level); m->offset = swap4((uint32_t)m->offset); m->in_offset = swap4((uint32_t)m->in_offset); - if (IS_STRING(m->type)) + if (!IS_STRING(m->type)) m->value.l = swap4(m->value.l); m->mask = swap4(m->mask); }