#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.150 2012/05/15 17:14:36 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.151 2012/09/06 14:42:39 christos Exp $")
#endif /* lint */
#include "magic.h"
(!text && (m->str_flags & (STRING_TEXTTEST | STRING_BINTEST)) == STRING_TEXTTEST))) ||
(m->flag & mode) != mode) {
/* Skip sub-tests */
- while (magic[magindex + 1].cont_level != 0 &&
- ++magindex < nmagic)
+ while (magindex + 1 < nmagic &&
+ magic[magindex + 1].cont_level != 0 &&
+ ++magindex)
continue;
continue; /* Skip to next top-level test*/
}