From 77130df6747c94c44ea4cb522177d611a24fd5d0 Mon Sep 17 00:00:00 2001 From: Han Pingtian Date: Thu, 18 Jun 2015 10:37:39 +0800 Subject: 35514: [[:foo:]] tests in completion should be more specific --- Src/pattern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/pattern.c') diff --git a/Src/pattern.c b/Src/pattern.c index 7e07548f9..8fa1a727f 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -1113,8 +1113,8 @@ range_type(char *start, int len) const char **csp; for (csp = colon_stuffs; *csp; csp++) { - if (!strncmp(start, *csp, len)) - return (csp - colon_stuffs) + PP_FIRST; + if (strlen(*csp) == len && !strncmp(start, *csp, len)) + return (csp - colon_stuffs) + PP_FIRST; } return PP_UNKWN; -- cgit 1.4.1