From 74451869f4a5111186d6a84d8d288e1004d4311b Mon Sep 17 00:00:00 2001 From: Klee Dienes Date: Wed, 16 Oct 2002 17:36:44 +0000 Subject: [PATCH] 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]. --- gdb/ChangeLog | 6 ++++++ gdb/stabsread.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.30.2