From 516c096d987f9b04ac24af440396f693947e98ab Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 30 Mar 2016 09:38:39 -0700 Subject: [PATCH] Fix encoded paragraph size --- sky/engine/core/dart/text.dart | 2 +- sky/engine/core/text/ParagraphBuilder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sky/engine/core/dart/text.dart b/sky/engine/core/dart/text.dart index a698ec6a0..4a0819011 100644 --- a/sky/engine/core/dart/text.dart +++ b/sky/engine/core/dart/text.dart @@ -368,7 +368,7 @@ Int32List _encodeParagraphStyle(TextAlign textAlign, String fontFamily, double fontSize, double lineHeight) { - Int32List result = new Int32List(3); + Int32List result = new Int32List(5); if (textAlign != null) { result[0] |= 1 << 1; result[1] = textAlign.index; diff --git a/sky/engine/core/text/ParagraphBuilder.cpp b/sky/engine/core/text/ParagraphBuilder.cpp index 15c04203f..95e275048 100644 --- a/sky/engine/core/text/ParagraphBuilder.cpp +++ b/sky/engine/core/text/ParagraphBuilder.cpp @@ -233,7 +233,7 @@ void ParagraphBuilder::addText(const std::string& text) PassRefPtr ParagraphBuilder::build(Int32List& encoded, const std::string& fontFamily, double fontSize, double lineHeight) { - DCHECK(encoded.num_elements() == 3); + DCHECK(encoded.num_elements() == 5); int32_t mask = encoded[0]; if (mask) { -- GitLab