From beadd8c3580963ac59a3cbf4b37d99055fe9e914 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 18 Jul 2004 08:05:44 +0000 Subject: [PATCH] Only treat colons in the switch name as important when looking for a toolname to check - colons in the switch value are now ignored. CCMAIL: 85416-done@bugs.kde.org git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2503 --- coregrind/vg_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index e2a15e4836..a8a09b5cf2 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -1689,11 +1689,14 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) for (i = 1; i < VG_(vg_argc); i++) { Char* arg = VG_(vg_argv)[i]; + Char* colon = arg; - // XXX: allow colons in options, for Josef + /* Look for a colon in the switch name */ + while (*colon && *colon != ':' && *colon != '=') + colon++; /* Look for matching "--toolname:foo" */ - if (VG_(strstr)(arg, ":")) { + if (*colon == ':') { if (VG_CLO_STREQN(2, arg, "--") && VG_CLO_STREQN(toolname_len, arg+2, toolname) && VG_CLO_STREQN(1, arg+2+toolname_len, ":")) -- 2.47.2