diff options
Diffstat (limited to 'freetype/src/type42/t42parse.c')
-rw-r--r-- | freetype/src/type42/t42parse.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/freetype/src/type42/t42parse.c b/freetype/src/type42/t42parse.c index c06dc911e..19c9680c0 100644 --- a/freetype/src/type42/t42parse.c +++ b/freetype/src/type42/t42parse.c @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 2002-2012 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -175,7 +175,7 @@ if ( ft_memcmp( stream->cursor, "%!PS-TrueTypeFont", 17 ) != 0 ) { - FT_TRACE2(( "not a Type42 font\n" )); + FT_TRACE2(( " not a Type42 font\n" )); error = T42_Err_Unknown_File_Format; } @@ -607,8 +607,9 @@ goto Fail; } - /* A string can have a trailing zero byte for padding. Ignore it. */ - if ( string_buf[string_size - 1] == 0 && ( string_size % 2 == 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 ) |