You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
563 B
18 lines
563 B
6 years ago
|
diff --git a/src/softmagic.c b/src/softmagic.c
|
||
|
index 8d08cad..8262788 100644
|
||
|
--- a/src/softmagic.c
|
||
|
+++ b/src/softmagic.c
|
||
|
@@ -199,9 +199,9 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
|
||
|
if (file_check_mem(ms, ++cont_level) == -1)
|
||
|
return -1;
|
||
|
|
||
|
- while (magic[magindex+1].cont_level != 0 &&
|
||
|
- ++magindex < nmagic) {
|
||
|
- m = &magic[magindex];
|
||
|
+ while (magindex + 1 < nmagic &&
|
||
|
+ magic[magindex + 1].cont_level != 0) {
|
||
|
+ m = &magic[++magindex];
|
||
|
ms->line = m->lineno; /* for messages */
|
||
|
|
||
|
if (cont_level < m->cont_level)
|