bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS


From: Gerd Möllmann
Subject: bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS
Date: Fri, 15 Jul 2022 17:10:18 +0200


> On 2022-07-15,, at 16:46 , Andreas Schwab <schwab@linux-m68k.org> wrote:
> 
> Does this work?
> 
> diff --git a/src/nsterm.m b/src/nsterm.m
> index 8e0c4b84f0..30768baced 100644
> --- a/src/nsterm.m
> +++ b/src/nsterm.m
> @@ -2900,10 +2900,7 @@ Hide the window (X11 semantics)
>   for (int y = 0 ; y < h ; y++)
>     for (int x = 0 ; x < w ; x++)
>       {
> -        /* XBM rows are always round numbers of bytes, with any unused
> -           bits ignored.  */
> -        int byte = y * (w/8 + (w%8 ? 1 : 0)) + x/8;
> -        bool bit = bits[byte] & (0x80 >> x%8);
> +        bool bit = bits[y] & (1 << (w - x - 1));
>         if (bit)
>           [p appendBezierPathWithRect:NSMakeRect (x, y, 1, 1)];
>       }
> 

It does indeed.  Thanks!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]