From 33b0506702a12c48dcdfde3484dae208c4bf1158 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 17 Dec 2010 21:43:18 +0100 Subject: Match command prefixes Match not only the first letter or the full command name, but an arbitrary prefix too. --- src/ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui.c b/src/ui.c index ce90532..176e1b2 100644 --- a/src/ui.c +++ b/src/ui.c @@ -143,7 +143,7 @@ ipset_match_cmd(const char *arg, const char * const name[]) if (len > strlen(name[0]) || !len) return false; - else if (strcmp(arg, name[0]) == 0) + else if (strncmp(arg, name[0], len) == 0) return true; else if (len != 1) return false; -- cgit v1.2.3