Re: [patch] bogl memset_var for 32 bpp screen
On Wed, Jan 17, 2001 at 05:17:14PM -0500, email@example.com wrote:
> On Wed, Jan 17, 2001 at 10:10:23PM +0800, ha shao wrote:
> > const int intsiz = sizeof(unsigned int) * 8 / b;
> > - const int mask = (1 << b) - 1;
> > + /* long long is needed for b == 32 */
> > + const int mask = ((long long) 1 << b) - 1;
> I'd have thought it would work anyway (since 1 << b is usually 0 for b
> >= 32, although this is not well-defined...). Odd.
Well, 1 << 32 will give 0 but b = 32; 1 << b will output 1.
So we have a mask of 0x00000000 here.
> Could you please look in to using the bogl-bterm package in the archive
> instead of the included bogl in CVS? It should work fine, although you'll
> have to fiddle a little to do the font reduction.
The same thing. To see the bug, start bterm and then run 'clear'.
The default background of bterm is white (weird). But it will be
cleared to black cuz the mask is 0, everything will be 0.