From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32094 invoked by alias); 16 Oct 2002 13:54:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32086 invoked from network); 16 Oct 2002 13:53:59 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 16 Oct 2002 13:53:59 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 181pYC-0006TV-00; Wed, 16 Oct 2002 09:53:32 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 181ocX-0006vK-00; Wed, 16 Oct 2002 09:53:57 -0400 Date: Wed, 16 Oct 2002 06:54:00 -0000 From: Daniel Jacobowitz To: Klee Dienes Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] minor nit in read_tilde_fields Message-ID: <20021016135357.GA26410@nevyn.them.org> Mail-Followup-To: Klee Dienes , gdb-patches@sources.redhat.com References: <1F507DC8-E0F2-11D6-B237-00039396EEB8@apple.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1F507DC8-E0F2-11D6-B237-00039396EEB8@apple.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00279.txt.bz2 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 > > * 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