From c18c1882c22593c3c51d1d0958493c89a567545c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Tue, 28 Feb 2012 07:52:04 +0100 Subject: [PATCH] [type42] Minor code optimization (again). * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. --- ChangeLog | 6 ++++++ src/type42/t42parse.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 207e120e..c50ce955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-02-26 Alexei Podtelezhnikov + + [type42] Minor code optimization (again). + + * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. + 2012-02-26 Mateusz Jurczyk Werner Lemberg diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index 1888c3c9..468b4633 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -607,9 +607,9 @@ goto Fail; } - /* A string can have a trailing zero byte for padding. Ignore it. */ - if ( string_size && - string_buf[string_size - 1] == 0 && ( string_size & 1 ) ) + /* A string can have a trailing zero (odd) byte for padding. */ + /* Ignore it. */ + if ( ( string_size & 1 ) && string_buf[string_size - 1] == 0 ) string_size--; if ( !string_size )