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 8e1f7f43e2
commit bd0a710872

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;