Damage: Remove usage of alloca
Replace with heap allocations.
This commit is contained in:
parent
2761c10331
commit
3633ae6efb
|
@ -1399,7 +1399,7 @@ damageText (DrawablePtr pDrawable,
|
||||||
|
|
||||||
imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16);
|
imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16);
|
||||||
|
|
||||||
charinfo = (CharInfoPtr *) ALLOCATE_LOCAL(count * sizeof(CharInfoPtr));
|
charinfo = (CharInfoPtr *) xalloc(count * sizeof(CharInfoPtr));
|
||||||
if (!charinfo)
|
if (!charinfo)
|
||||||
return x;
|
return x;
|
||||||
|
|
||||||
|
@ -1421,7 +1421,7 @@ damageText (DrawablePtr pDrawable,
|
||||||
(*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
|
(*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
|
||||||
FONTGLYPHS(pGC->font));
|
FONTGLYPHS(pGC->font));
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(charinfo);
|
xfree(charinfo);
|
||||||
return x + w;
|
return x + w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue