From 32b52eaad1f898341053bcd380302b5c43b37044 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 6 Oct 2015 08:20:10 +0000 Subject: [PATCH] Log the matched offset (and the new offset) instead of just of the new offset (as if it was where the match was found). --- usr.bin/file/magic-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.20.1