Fixed a memory allocation/corruption bug when growing the font cache.
This commit is contained in:
parent
baf2721bd8
commit
ecc3f12af9
|
@ -2848,7 +2848,7 @@ static fontObject* XFONT_GetCacheEntry(void)
|
||||||
TRACE("\tgrowing font cache from %i to %i\n", fontCacheSize, prev_i );
|
TRACE("\tgrowing font cache from %i to %i\n", fontCacheSize, prev_i );
|
||||||
|
|
||||||
if( (newCache = (fontObject*)HeapReAlloc(GetProcessHeap(), 0,
|
if( (newCache = (fontObject*)HeapReAlloc(GetProcessHeap(), 0,
|
||||||
fontCache, prev_i)) )
|
fontCache, prev_i * sizeof(fontObject))) )
|
||||||
{
|
{
|
||||||
i = fontCacheSize;
|
i = fontCacheSize;
|
||||||
fontCacheSize = prev_i;
|
fontCacheSize = prev_i;
|
||||||
|
|
Loading…
Reference in New Issue