summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-29 00:08:03 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-29 00:08:03 +0000
commit9a6e339ab2aef1f47f072d49b6f3cc7cf7f3ed3e (patch)
tree111fdc67ca83198b15afcac5eda876b39659fcf8
parent4865b1603b22530f5553368604755cc732bac86b (diff)
downloadnetsurf-9a6e339ab2aef1f47f072d49b6f3cc7cf7f3ed3e.tar.gz
netsurf-9a6e339ab2aef1f47f072d49b6f3cc7cf7f3ed3e.tar.bz2
Fix OT_Indirect handling
-rw-r--r--amiga/os3support.c11
1 files changed, 6 insertions, 5 deletions
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)