wineps: Cope correctly with a missing table.
Signed-off-by: Wolfgang Walter <wine@stwm.de> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b5606045bc
commit
2b23eb2e9a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue