Index: src/core/SkFontDescriptor.cpp |
diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp |
index 7679d92a146a8ccc5ac2badb99b29440e5cea499..5088ed7687bcec8dae2954ca2c5d3cf4aaa5b43b 100644 |
--- a/src/core/SkFontDescriptor.cpp |
+++ b/src/core/SkFontDescriptor.cpp |
@@ -25,7 +25,7 @@ SkFontDescriptor::SkFontDescriptor(SkTypeface::Style style) { |
} |
static void read_string(SkStream* stream, SkString* string) { |
- const uint32_t length = stream->readPackedUInt(); |
+ const uint32_t length = SkToU32(stream->readPackedUInt()); |
if (length > 0) { |
string->resize(length); |
stream->read(string->writable_str(), length); |