freetype2/src/cff
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
cff.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffcmap.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffcmap.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffdrivr.c */*: s/PSNames/psnames/. 2018-09-03 09:08:47 +02:00
cffdrivr.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cfferrs.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffgload.c Fix handing of `FT_Bool'. 2018-09-25 09:10:09 +02:00
cffgload.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffload.c Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-15 18:13:17 +02:00
cffload.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffobjs.c */*: s/PSNames/psnames/. 2018-09-03 09:08:47 +02:00
cffobjs.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cffparse.c Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-15 18:13:17 +02:00
cffparse.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
cfftoken.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
module.mk Update copyright year. 2018-01-02 09:33:57 +01:00
rules.mk Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00