From 4d5a9be0dcdffa64faf8020185c600890f2391b4 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 24 Jun 2012 14:25:18 +0200 Subject: complete: fix parameter complete with multiple '.' When a device parameter has dots in its name, we have to use strchr instead of strrchr, because the devicename ends at the first dot, not at the last one. Signed-off-by: Sascha Hauer --- common/complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/complete.c') diff --git a/common/complete.c b/common/complete.c index 0780888cae..a6889ed5bb 100644 --- a/common/complete.c +++ b/common/complete.c @@ -221,7 +221,7 @@ static int env_param_complete(struct string_list *sl, char *instr, int eval) end = ' '; } - instr_param = strrchr(instr, '.'); + instr_param = strchr(instr, '.'); len = strlen(instr); current_c = get_current_context(); -- cgit v1.2.3