[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 889943e2bd: Fix ASAN error with fringe bitmap on NS
From: |
Andreas Schwab |
Subject: |
master 889943e2bd: Fix ASAN error with fringe bitmap on NS |
Date: |
Fri, 15 Jul 2022 11:28:06 -0400 (EDT) |
branch: master
commit 889943e2bd5668335649b064b10b70a15c17c189
Author: Andreas Schwab <schwab@linux-m68k.org>
Commit: Andreas Schwab <schwab@linux-m68k.org>
Fix ASAN error with fringe bitmap on NS
* src/nsterm.m (ns_define_fringe_bitmap): Correctly access fringe
bitmap data. (Bug#56553)
---
src/nsterm.m | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 582bc9f6a2..57f1f44de2 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2900,10 +2900,7 @@ ns_define_fringe_bitmap (int which, unsigned short
*bits, int h, int w)
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)];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 889943e2bd: Fix ASAN error with fringe bitmap on NS,
Andreas Schwab <=