diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-05-01 10:34:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-05-01 10:34:31 +0000 |
commit | 45ab3de1d571df48ba8affbe822f5adf4a2810c5 (patch) | |
tree | ba2db32b1ae3e1d6b037cb16a03f10bed4706fec /usr.bin/file | |
parent | 66fdf263f1037797446dc5c1fe75832dd63638d8 (diff) |
Trim = prefix from regex (it a noop).
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/magic-load.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/file/magic-load.c b/usr.bin/file/magic-load.c index 00640cdf0b1..cb6397a50d3 100644 --- a/usr.bin/file/magic-load.c +++ b/usr.bin/file/magic-load.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-load.c,v 1.20 2016/05/01 08:48:39 nicm Exp $ */ +/* $OpenBSD: magic-load.c,v 1.21 2016/05/01 10:34:30 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -862,6 +862,8 @@ magic_parse_value(struct magic_line *ml, char **line) } /* FALLTHROUGH */ case MAGIC_TYPE_REGEX: + if (**line == '=') + (*line)++; copy = s = xmalloc(strlen(*line) + 1); if (magic_get_string(line, s, &slen) != 0) { magic_warn(ml, "can't parse string"); |