This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] minor nit in read_tilde_fields
You're right, please commit this. Not sure how this didn't show up in
my testing...
On Wed, Oct 16, 2002 at 06:29:16AM -0400, Klee Dienes wrote:
> 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;
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer