This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re[2]: Patch for Setup.exe problem and for mklink2.cc
- From: Pavel Tsekov <ptsekov at syntrex dot com>
- To: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Cc: cygwin-apps at cygwin dot com
- Date: Fri, 29 Mar 2002 10:41:58 +0100
- Subject: Re[2]: Patch for Setup.exe problem and for mklink2.cc
- Organization: Syntrex, Inc.
- References: <FC169E059D1A0442A04C40F86D9BA76008ABE7@itdomain003.itdomain.net.au>
- Reply-to: Pavel Tsekov <ptsekov at syntrex dot com>
Hello Robert,
Friday, March 29, 2002, 10:25:08 AM, you wrote:
>> > Found the problem causing the segment violation and probably
>> > causing Jonas Eriksson's problem. It is a typical case of
>> > 'off by 1'. In PickView::set_headers the loop filling the
>> > window header does one iteration too much, resulting in a
>> > call to DoInsertItem with a NULL string pointer and hence a
>> > crash following. While debugging this I could not compile the
>> > new mklink2.cc ( the
>> > c++ version of the original mklink2.c). It seems three & (address of
>> > c++ operator)
>> > have disappeared in the transition. Putting them back made
>> > the compiler happy. Is this OK Robert ?
>>
>> I'll check the off-by-one fix in tomorrow, as I'm off to bed now.
RC> Actually, this is not an off-by-one error. It's an invalid data error -
RC> the loop is meant to go from 0 to == last_col, where last col is meant
RC> to be equal to the greatest column number. The first set of column
RC> details had last_col set incorrectly.
Btw I don't think my question is related to this is issue but still...
I notice there is a dummy column in the list view after the "Package"
column - is this a feature ? If so what is its purpose ?