| author | Jens Thoms Toerring <jt@toerring.de> | 2014年07月01日 11:34:28 +0200 |
|---|---|---|
| committer | Jens Thoms Toerring <jt@toerring.de> | 2014年07月01日 11:34:28 +0200 |
| commit | 79bb2ec594084d26c796cf6f9a2c930985803ab3 (patch) | |
| tree | 3af18b525f1de1371cb9bcd0d1f7f350f1ba1cb9 | |
| parent | 996fbe32e32b177a985f3d54212b350ae40d62ec (diff) | |
| download | xforms-79bb2ec594084d26c796cf6f9a2c930985803ab3.tar.gz | |
| -rw-r--r-- | lib/ttfonts.cx | 10 |
diff --git a/lib/ttfonts.cx b/lib/ttfonts.cx index a71e9ab..3dcc688 100644 --- a/lib/ttfonts.cx +++ b/lib/ttfonts.cx @@ -103,8 +103,14 @@ static int cmp_fnt_index( const void * arg1, const void * arg2 ) { - return ( ( const FL_FONT * ) arg1 )->index == - ( ( const FL_FONT * ) arg2 )->index; + size_t index1 = ( ( const FL_FONT * ) arg1 )->index; + size_t index2 = ( ( const FL_FONT * ) arg2 )->index; + + if ( index1 < index2 ) + return -1; + else if ( index1 == index2 ) + return 0; + return 1; } |