aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index df127c4..a71c6ad 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1037,8 +1037,13 @@ cp_find_first_component_aux (const char *name, int permissive)
return strlen (name);
}
case '\0':
- case ':':
return index;
+ case ':':
+ /* ':' marks a component iff the next character is also a ':'.
+ Otherwise it is probably malformed input. */
+ if (name[index + 1] == ':')
+ return index;
+ break;
case 'o':
/* Operator names can screw up the recursion. */
if (operator_possible