diff options
Diffstat (limited to 'src/psaux')
-rw-r--r-- | src/psaux/psobjs.c | 18 | ||||
-rw-r--r-- | src/psaux/psobjs.h | 8 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index 1c3ff72d3..750e37d58 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -165,10 +165,10 @@ /* reallocation fails. */ /* */ FT_LOCAL_DEF( FT_Error ) - ps_table_add( PS_Table table, - FT_Int idx, - void* object, - FT_PtrDist length ) + ps_table_add( PS_Table table, + FT_Int idx, + void* object, + FT_UInt length ) { if ( idx < 0 || idx >= table->max_elems ) { @@ -176,12 +176,6 @@ return FT_THROW( Invalid_Argument ); } - if ( length < 0 ) - { - FT_ERROR(( "ps_table_add: invalid length\n" )); - return FT_THROW( Invalid_Argument ); - } - /* grow the base block if needed */ if ( table->cursor + length > table->capacity ) { @@ -932,7 +926,7 @@ FT_Memory memory ) { FT_Byte* cur = *cursor; - FT_PtrDist len = 0; + FT_UInt len = 0; FT_Int count; FT_String* result; FT_Error error; @@ -972,7 +966,7 @@ } } - len = cur - *cursor; + len = (FT_UInt)( cur - *cursor ); if ( cur >= limit || FT_ALLOC( result, len + 1 ) ) return 0; diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h index aa2d7390c..8bfb9ea6c 100644 --- a/src/psaux/psobjs.h +++ b/src/psaux/psobjs.h @@ -52,10 +52,10 @@ FT_BEGIN_HEADER FT_Memory memory ); FT_LOCAL( FT_Error ) - ps_table_add( PS_Table table, - FT_Int idx, - void* object, - FT_PtrDist length ); + ps_table_add( PS_Table table, + FT_Int idx, + void* object, + FT_UInt length ); FT_LOCAL( void ) ps_table_done( PS_Table table ); |