This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]