aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cp-support.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bc6e55b..41e01cd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-20 Pedro Alves <palves@redhat.com>
+
+ * cp-support.c (cp_find_first_component_aux): Add missing case for
+ end of string.
+
2017-07-18 David Blaikie <dblaikie@gmail.com>
* dwarf2read.c (create_cus_hash_table): Re-add lost initialization
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 122fadd..df9a563 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1009,6 +1009,8 @@ cp_find_first_component_aux (const char *name, int permissive)
++index;
switch (name[index])
{
+ case '\0':
+ return index;
/* Skip over one less than the appropriate number of
characters: the for loop will skip over the last
one. */