dix: fix inttype mismatches in AllocARGBCursor & AllocGlyphCursor

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-08 17:44:45 +02:00
committed by Enrico Weigelt
parent aefde94a2d
commit 2285961661

View File

@@ -366,15 +366,11 @@ AllocGlyphCursor(Font source, unsigned short sourceChar, Font mask, unsigned sho
return BadValue;
}
if (!maskfont) {
long n;
unsigned char *mskptr;
n = BitmapBytePad(cm.width) * (long) cm.height;
mskptr = mskbits = calloc(1, n);
if (!mskptr)
size_t n = BitmapBytePad(cm.width) * (long) cm.height;
mskbits = calloc(1, n);
if (!mskbits)
return BadAlloc;
while (--n >= 0)
*mskptr++ = (unsigned char)~0U;
memset(mskbits, 0xFF, n);
}
else {
if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) {