From: Matthias Kramm Date: Tue, 11 May 2010 22:46:15 +0000 (-0700) Subject: small bug in ttf reading X-Git-Tag: version-0-9-1~32 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=fc8854e5ed42dbcef96d25eb851b9873707a15ff;hp=94fca1d60ea0f076d7315dbb1c1b27a74176a263 small bug in ttf reading --- diff --git a/lib/ttf.c b/lib/ttf.c index 601aa74..c1fd06d 100644 --- a/lib/ttf.c +++ b/lib/ttf.c @@ -1638,15 +1638,15 @@ static table_post_t*post_new(ttf_t*ttf) void post_parse(memreader_t*r, ttf_t*ttf) { table_post_t*post = ttf->post = rfx_calloc(sizeof(table_post_t)); - U16 format = readU16(r); - post->italic_angle = readU16(r); + U32 format = readU32(r); + post->italic_angle = readU32(r); post->underline_position = readU16(r); post->underline_thickness = readU16(r); - U16 is_monospaced = readU16(r); - readU16(r); // min mem 42 - readU16(r); - readU16(r); // min mem 1 - readU16(r); + U16 is_monospaced = readU32(r); + readU32(r); // min mem 42 + readU32(r); + readU32(r); // min mem 1 + readU32(r); } void post_write(ttf_t*ttf, ttf_table_t*table) { diff --git a/lib/ttf.h b/lib/ttf.h index e5462e9..0d1ff50 100644 --- a/lib/ttf.h +++ b/lib/ttf.h @@ -140,7 +140,7 @@ typedef struct _table_head { } table_head_t; typedef struct _table_post { - U16 italic_angle; + U32 italic_angle; U16 underline_position; U16 underline_thickness; } table_post_t;