This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] minor nit in read_tilde_fields
- From: Klee Dienes <klee at apple dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 16 Oct 2002 06:29:16 -0400
- Subject: [PATCH] minor nit in read_tilde_fields
The following patch fixes what I suspect is an "oops" in the 2002-10-11
patch to stabsread.c:
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].
diff -u -r1.21 stabsread.c
--- stabsread.c 2002/10/12 18:23:58 1.21
+++ stabsread.c 2002/10/16 10:29:05
@@ -4189,7 +4189,7 @@
{
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;