зеркало из https://github.com/mozilla/pjs.git
Bug 381654. Initialize PangoAnalysis fields robustly. patch by Karl Tomlinson, r+sr=roc
This commit is contained in:
Родитель
7a7a50586b
Коммит
592b7e26bd
|
@ -472,10 +472,12 @@ gfxPangoFont::GetCharSize(char aChar, gfxSize& aInkSize, gfxSize& aLogSize,
|
|||
PRUint32 *aGlyphID)
|
||||
{
|
||||
PangoAnalysis analysis;
|
||||
// Initialize new fields, gravity and flags in pango 1.16
|
||||
// (or padding in 1.14).
|
||||
// See bug #378700 for why we are using memset instead of { 0 }
|
||||
// aggregate initialization.
|
||||
memset(&analysis, 0, sizeof(analysis));
|
||||
analysis.font = GetPangoFont();
|
||||
analysis.level = 0;
|
||||
analysis.lang_engine = nsnull;
|
||||
analysis.extra_attrs = nsnull;
|
||||
analysis.language = pango_language_from_string("en");
|
||||
analysis.shape_engine = pango_font_find_shaper(analysis.font, analysis.language, aChar);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче