freetype2/src/pfr
Werner Lemberg a9af691481 Fix handing of `FT_Bool'.
Before this commit we had code like

  (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)

Since `FT_Bool' is defined to be an `unsigned char', the code
evaluated to something like

  (unsigned char)( 0x8532 & 0x8000)

which in turn expanded to

  (unsigned char)( 0x8000)

and finally yielded 0x00 – i.e., false – not as expected.

Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.

* include/freetype/fttypes.h (FT_BOOL): Add a comparison against
zero so that we always have a Boolean expression.

*/*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
possible.
2018-09-25 09:10:09 +02:00
..
Jamfile Update copyright year. 2018-01-02 09:33:57 +01:00
module.mk Update copyright year. 2018-01-02 09:33:57 +01:00
pfr.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrcmap.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrcmap.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrdrivr.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrdrivr.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrerror.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrgload.c Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-15 18:13:17 +02:00
pfrgload.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrload.c Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-15 18:13:17 +02:00
pfrload.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrobjs.c Fix handing of `FT_Bool'. 2018-09-25 09:10:09 +02:00
pfrobjs.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrsbit.c Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-15 18:13:17 +02:00
pfrsbit.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pfrtypes.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
rules.mk Update copyright year. 2018-01-02 09:33:57 +01:00