Bug 1109972: nsHyphenator should not assume sizeof(bool) == sizeof(char). r=dbaron

This commit is contained in:
Cameron Kaiser 2014-12-10 17:10:35 -08:00
parent 8a9e82e60b
commit 63b0259e8b

View File

@ -49,7 +49,7 @@ nsHyphenator::Hyphenate(const nsAString& aString,
if (!aHyphens.SetLength(aString.Length())) {
return NS_ERROR_OUT_OF_MEMORY;
}
memset(aHyphens.Elements(), false, aHyphens.Length());
memset(aHyphens.Elements(), false, aHyphens.Length() * sizeof(bool));
bool inWord = false;
uint32_t wordStart = 0, wordLimit = 0;