2002-10-16 Klee Dienes <kdienes@apple.com>
authorKlee Dienes <kdienes@apple.com>
Wed, 16 Oct 2002 17:36:44 +0000 (17:36 +0000)
committerKlee Dienes <kdienes@apple.com>
Wed, 16 Oct 2002 17:36:44 +0000 (17:36 +0000)
        * 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
gdb/stabsread.c

index 6e25cc3e1b941624a23c9080cb62c1b2901beaee..b8b48855ee9476b85026d811a7de3df989b14c41 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-16  Klee Dienes  <kdienes@apple.com>
+
+       * 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  <fedor@gnu.org>
 
        * symtab.h: New objc_specific struct.
index 00634ac964e0e7b48221c9890f88beedf4642dcf..ea2045ec07b841695962606015cf13a4dbb489ce 100644 (file)
@@ -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;