mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Bug 1352082 - Avoid shifting a signed integer left in C++.
Tag UXP Issue #1344
This commit is contained in:
parent
2d6fd63895
commit
a5448058ba
4 changed files with 10 additions and 10 deletions
|
|
@ -73,7 +73,7 @@ nsHtml5ElementName::isCustom()
|
|||
nsHtml5ElementName*
|
||||
nsHtml5ElementName::elementNameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner)
|
||||
{
|
||||
int32_t hash = nsHtml5ElementName::bufToHash(buf, length);
|
||||
uint32_t hash = nsHtml5ElementName::bufToHash(buf, length);
|
||||
int32_t index = nsHtml5ElementName::ELEMENT_HASHES.binarySearch(hash);
|
||||
if (index < 0) {
|
||||
return new nsHtml5ReleasableElementName(nsHtml5Portability::newLocalNameFromBuffer(buf, offset, length, interner));
|
||||
|
|
@ -87,10 +87,10 @@ nsHtml5ElementName::elementNameByBuffer(char16_t* buf, int32_t offset, int32_t l
|
|||
}
|
||||
}
|
||||
|
||||
int32_t
|
||||
uint32_t
|
||||
nsHtml5ElementName::bufToHash(char16_t* buf, int32_t len)
|
||||
{
|
||||
int32_t hash = len;
|
||||
uint32_t hash = len;
|
||||
hash <<= 5;
|
||||
hash += buf[0] - 0x60;
|
||||
int32_t j = len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue