Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
0abbc9f5
by Werner Lemberg at 2021-06-02T06:36:11+02:00
2 changed files:
Changes:
1 |
+2021-06-02 Werner Lemberg <wl@gnu.org>
|
|
2 |
+ |
|
3 |
+ [psaux] Fix MSVC compiler warnings.
|
|
4 |
+ |
|
5 |
+ * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
|
|
6 |
+ Add cast.
|
|
7 |
+ |
|
1 | 8 |
2021-05-29 Werner Lemberg <wl@gnu.org>
|
2 | 9 |
|
3 | 10 |
Fix compilation errors and (some) warnings for clang++.
|
... | ... | @@ -622,7 +622,8 @@ |
622 | 622 |
|
623 | 623 |
/* Rough sanity check: The minimum line length of the `TrackKern` */
|
624 | 624 |
/* command is 20 characters (including the EOL character). */
|
625 |
- if ( ( stream->limit - stream->cursor ) / 20 < fi->NumTrackKern )
|
|
625 |
+ if ( (FT_ULong)( stream->limit - stream->cursor ) / 20 <
|
|
626 |
+ fi->NumTrackKern )
|
|
626 | 627 |
{
|
627 | 628 |
FT_ERROR(( "afm_parse_track_kern:"
|
628 | 629 |
" number of track kern entries exceeds stream size\n" ));
|
... | ... | @@ -763,7 +764,8 @@ |
763 | 764 |
/* Rough sanity check: The minimum line length of the `KP`, */
|
764 | 765 |
/* `KPH`,`KPX`, and `KPY` commands is 10 characters (including */
|
765 | 766 |
/* the EOL character). */
|
766 |
- if ( ( stream->limit - stream->cursor ) / 10 < fi->NumKernPair )
|
|
767 |
+ if ( (FT_ULong)( stream->limit - stream->cursor ) / 10 <
|
|
768 |
+ fi->NumKernPair )
|
|
767 | 769 |
{
|
768 | 770 |
FT_ERROR(( "afm_parse_kern_pairs:"
|
769 | 771 |
" number of kern pairs exceeds stream size\n" ));
|