Date: Sat, 10 May 1997 06:33:49 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG (FreeBSD hackers) Subject: Re: g++ shared library segfaults Message-ID: <19970510063349.ZO50925@uriah.heep.sax.de> In-Reply-To: <199705092251.PAA05670@rah.star-gate.com>; from Amancio Hasty on May 9, 1997 15:51:51 -0700 References: <19970509214357.SQ03572@uriah.heep.sax.de> <199705092251.PAA05670@rah.star-gate.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As Amancio Hasty wrote: > I traced it further more and it looks like a bug in Docviewer.c using > an illegal reference to a local variable. > > for (long i = 0; i < count; ++i) { > ViewerColorInfo& info = _color_info->item_ref(i); > if (strcmp(info._name, name) == 0) { > break; > } > } > > later on it checks the value of i. That's not illegal. The scope of i is inside the current block (at the same level where the stuff is you've been quoting), from the line with the `for' loop, to the end of that block. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970510063349.ZO50925>