Skip to content

Commit abecdde

Browse files
committed
Merge branch 'jc/diff-ws-error-highlight'
A hotfix to a new feature in 2.5.0-rc. * jc/diff-ws-error-highlight: diff: parse ws-error-highlight option more strictly
2 parents 961abca + 3f4f17b commit abecdde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

diff.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,12 @@ static void enable_patch_output(int *fmt) {
36533653

36543654
static int parse_one_token(const char **arg, const char *token)
36553655
{
3656-
return skip_prefix(*arg, token, arg) && (!**arg || **arg == ',');
3656+
const char *rest;
3657+
if (skip_prefix(*arg, token, &rest) && (!*rest || *rest == ',')) {
3658+
*arg = rest;
3659+
return 1;
3660+
}
3661+
return 0;
36573662
}
36583663

36593664
static int parse_ws_error_highlight(struct diff_options *opt, const char *arg)

0 commit comments

Comments
 (0)