From: nicm Date: Tue, 6 Oct 2015 08:20:10 +0000 (+0000) Subject: Log the matched offset (and the new offset) instead of just of the new X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=32b52eaad1f898341053bcd380302b5c43b37044;p=openbsd Log the matched offset (and the new offset) instead of just of the new offset (as if it was where the match was found). --- diff --git a/usr.bin/file/magic-test.c b/usr.bin/file/magic-test.c index 9f239c15ecf..06778d177d5 100644 --- a/usr.bin/file/magic-test.c +++ b/usr.bin/file/magic-test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-test.c,v 1.14 2015/10/05 19:50:38 nicm Exp $ */ +/* $OpenBSD: magic-test.c,v 1.15 2015/10/06 08:20:10 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1213,8 +1213,8 @@ magic_test_line(struct magic_line *ml, struct magic_state *ms) if (ml->mimetype != NULL) ms->mimetype = ml->mimetype; - magic_warn(ml, "test %s/%c matched at offset %zu: '%s'", - ml->type_string, ml->test_operator, ms->offset, + magic_warn(ml, "test %s/%c matched at offset %lld (now %zu): '%s'", + ml->type_string, ml->test_operator, offset, ms->offset, ml->result == NULL ? "" : ml->result); offset = ms->offset;