Commit 2b23eb2e authored by Wolfgang Walter's avatar Wolfgang Walter Committed by Alexandre Julliard

wineps: Cope correctly with a missing table.

parent b5606045
......@@ -100,10 +100,15 @@ struct tagTYPE42 {
static BOOL LoadTable(HDC hdc, OTTable *table)
{
unsigned int i;
DWORD len;
if(table->MS_tag == MS_MAKE_TAG('g','d','i','r')) return TRUE;
table->len = GetFontData(hdc, table->MS_tag, 0, NULL, 0);
table->data = HeapAlloc(GetProcessHeap(), 0, (table->len + 3) & ~3 );
table->len = 0;
len = GetFontData(hdc, table->MS_tag, 0, NULL, 0);
if(len == GDI_ERROR) return FALSE;
table->data = HeapAlloc(GetProcessHeap(), 0, (len + 3) & ~3);
if(!table->data) return FALSE;
table->len = len;
memset(table->data + ((table->len - 1) & ~3), 0, sizeof(DWORD));
GetFontData(hdc, table->MS_tag, 0, table->data, table->len);
table->check = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment