mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
Fix potential bustage.
This commit is contained in:
parent
e6598e05b6
commit
78c8b14e8b
@ -636,7 +636,7 @@ nsXBLPrototypeHandler::MouseEventMatched(nsIAtom* aEventType, nsIDOMMouseEvent*
|
||||
|
||||
struct keyCodeData {
|
||||
const char* str;
|
||||
size_t strlen;
|
||||
size_t strlength;
|
||||
PRUint32 keycode;
|
||||
};
|
||||
|
||||
@ -776,7 +776,7 @@ PRInt32 nsXBLPrototypeHandler::GetMatchingKeyCode(const nsAReadableString& aKeyN
|
||||
PRUint32 keyNameLength = keyName.Length();
|
||||
const char* keyNameStr = keyName.get();
|
||||
for (int i = 0; i < (sizeof(gKeyCodes) / sizeof(gKeyCodes[0])); ++i)
|
||||
if (keyNameLength == gKeyCodes[i].strlen &&
|
||||
if (keyNameLength == gKeyCodes[i].strlength &&
|
||||
!nsCRT::strcmp(gKeyCodes[i].str, keyNameStr))
|
||||
return gKeyCodes[i].keycode;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user