Bug 907539: Use sizeof(PRUnichar) instead of magic number 2, when converting from bytes to wide-string-length in nsCheapString constructor. r=ehsan

This commit is contained in:
Daniel Holbert 2013-08-21 12:31:36 -07:00
parent f9b077c0c8
commit ab58b5ad66

View File

@ -63,7 +63,7 @@ public:
nsCheapString(nsStringBuffer* aBuf)
{
if (aBuf)
aBuf->ToString(aBuf->StorageSize()/2 - 1, *this);
aBuf->ToString(aBuf->StorageSize()/sizeof(PRUnichar) - 1, *this);
}
};