1 --- core/fxge/ge/cfx_facecache.cpp
2 +++ core/fxge/ge/cfx_facecache.cpp
3 @@ -206,7 +206,8 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont,
7 - memset(pDestBuf, 0, dest_pitch * bmheight);
8 + if (dest_pitch != 0 && bmheight != 0)
9 + memset(pDestBuf, 0, dest_pitch * bmheight);
10 if (anti_alias == FXFT_RENDER_MODE_MONO &&
11 FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
12 FXFT_PIXEL_MODE_MONO) {
13 --- third_party/agg23/agg_rasterizer_scanline_aa.h
14 +++ third_party/agg23/agg_rasterizer_scanline_aa.h
16 cover += cur_cell->cover;
19 - alpha = calculate_alpha((cover << (poly_base_shift + 1)) - area, no_smooth);
20 + alpha = calculate_alpha(int(unsigned(cover) << (poly_base_shift + 1)) - area, no_smooth);
22 sl.add_cell(x, alpha);
26 if(num_cells && cur_cell->x > x) {
27 - alpha = calculate_alpha(cover << (poly_base_shift + 1), no_smooth);
28 + alpha = calculate_alpha(unsigned(cover) << (poly_base_shift + 1), no_smooth);
30 sl.add_span(x, cur_cell->x - x, alpha);