calcMinMaxWidth in AutoTableLayout...
David Hyatt
hyatt@apple.com
Wed, 29 Jan 2003 16:15:20 -0800
... uses ints to compute a maxwidth, which can sometimes be very large,
i.e., larger than the maximum short value. When you assign back to
table->m_maxWidth, you end up with a negative number for the max width.
This was the cause of the CNN bug I was seeing. Right before doing the
assignment I just added this to fix the bug:
// Max widths can overflow. We need to bounds check them.
if (maxWidth > 10000)
maxWidth = 10000;
table->m_maxWidth = maxWidth;
dave