With the color support in Palm OS 3.5, lists with greater than a certain
number of entries are susceptible to an intermittent bug where the list
display ends up blank.

The bug results from the following snippet from OS 3.5's List.c at line 510,
where it's trying to determine whether there is any unused area at the
bottom of the list to fill with the proper background color ...

r.extent.y -= visibleItem * FntLineHeight();
 if (r.extent.y) {
    r.topLeft.y += visibleItem * FntLineHeight();
    PrvSetColors(false);
    WinEraseRectangle(&r, 0);
 }

"visibleItem" is the last item visible on the list.
FntLineHeight is 11 for the "normal" font.

With "normal" font, and 2978 at the bottom, it works fine.
With "normal" font, and 2979 at the bottom, it fails because the multiply
overflows the r.extent.y integer.

Is this a known bug, and is there a fix for it?



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to