From 9a6e339ab2aef1f47f072d49b6f3cc7cf7f3ed3e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 29 Jan 2015 00:08:03 +0000 Subject: Fix OT_Indirect handling --- amiga/os3support.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'amiga/os3support.c') diff --git a/amiga/os3support.c b/amiga/os3support.c index 548d7ce16..a49534292 100644 --- a/amiga/os3support.c +++ b/amiga/os3support.c @@ -47,7 +47,8 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl { BPTR fh = 0; int64 size = 0; - struct TagItem *buffer, *ti; + struct TagItem *ti; + UBYTE *buffer; STRPTR fname, otagpath; struct BulletBase *BulletBase; struct OutlineFont *of = NULL; @@ -78,7 +79,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl Close(fh); /* The first tag is supposed to be OT_FileIdent and should equal 'size' */ - struct TagItem *tag = buffer; + struct TagItem *tag = (struct TagItem *)buffer; if((tag->ti_Tag != OT_FileIdent) || (tag->ti_Data != (ULONG)size)) { LOG(("Invalid OTAG file")); FreeVec(buffer); @@ -87,9 +88,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl } /* Relocate all the OT_Indirect tags */ - struct TagItem *tstate = buffer; - - while (ti = NextTagItem(&tstate)) { + while (ti = NextTagItem(&tag)) { if(ti->ti_Tag & OT_Indirect) { ti->ti_Data += buffer; } @@ -131,6 +130,8 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl of->olf_EEngine = eengine; of->OTagPath = otagpath; of->olf_OTagList = buffer; + + return of; } void CloseOutlineFont(struct OutlineFont *of, struct List *list) -- cgit v1.2.3