From: Klee Dienes Date: Wed, 16 Oct 2002 17:36:44 +0000 (+0000) Subject: 2002-10-16 Klee Dienes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=74451869f4a5111186d6a84d8d288e1004d4311b;p=binutils-gdb.git 2002-10-16 Klee Dienes * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2] to get the last character of a char[] buffer, not name[sizeof(vptr_name)-1]. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6e25cc3e1b9..b8b48855ee9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-10-16 Klee Dienes + + * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2] + to get the last character of a char[] buffer, not + name[sizeof(vptr_name)-1]. + 2002-10-14 Adam Fedor * symtab.h: New objc_specific struct. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 00634ac964e..ea2045ec07b 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -4137,7 +4137,7 @@ read_tilde_fields (struct field_info *fip, char **pp, struct type *type, { char *name = TYPE_FIELD_NAME (t, i); if (!strncmp (name, vptr_name, sizeof (vptr_name) - 2) - && is_cplus_marker (name[sizeof (vptr_name) - 1])) + && is_cplus_marker (name[sizeof (vptr_name) - 2])) { TYPE_VPTR_FIELDNO (type) = i; goto gotit;