]>
Commit | Line | Data |
---|---|---|
e3e5690a AM |
1 | --- file-4.18.org/src/funcs.c 2006-10-31 20:37:17.000000000 +0100 |
2 | +++ file/src/funcs.c 2006-11-25 00:52:17.259907000 +0100 | |
3 | @@ -151,10 +151,16 @@ | |
4 | protected int | |
5 | file_reset(struct magic_set *ms) | |
6 | { | |
7 | + struct mlist *ml; | |
8 | if (ms->mlist == NULL) { | |
9 | file_error(ms, 0, "no magic files loaded"); | |
10 | return -1; | |
11 | } | |
12 | + for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) { | |
13 | + uint32_t magindex; | |
14 | + for (magindex = 0; magindex < ml->nmagic; magindex++) | |
15 | + ml->magic[magindex].offset = 0; | |
16 | + } | |
17 | ms->o.ptr = ms->o.buf; | |
18 | ms->haderr = 0; | |
19 | ms->error = -1; |