mirror of
https://bjh21.me.uk/bedstead/.git
synced 2026-07-10 22:13:07 -04:00
Stop dopalt() reading off the end of the character bitmap
Spotted by GCC -Warray-bounds.
This commit is contained in:
parent
e129bcd034
commit
b2bda72f72
@ -2618,7 +2618,7 @@ static struct glyph const *glyphs_by_name[NGLYPHS];
|
||||
static void dolookups(struct glyph const *);
|
||||
|
||||
static bool
|
||||
getpix(char const data[YSIZE], int x, int y, unsigned flags)
|
||||
getpix(char const data[YSIZE - 1], int x, int y, unsigned flags)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -3093,7 +3093,7 @@ dopalt(struct glyph const *g)
|
||||
* one pixel, and a right side-bearing of zero. Space
|
||||
* characters get an advance width of three pixels.
|
||||
*/
|
||||
for (i = 0; i < YSIZE; i++)
|
||||
for (i = 0; i < YSIZE - 1; i++)
|
||||
cols |= g->data[i] & ((1 << XSIZE) - 1);
|
||||
if (cols == 0)
|
||||
dh = 3 - XSIZE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user