mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Use the isdigit helper
This commit is contained in:
@@ -26,8 +26,7 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
|
||||
&characterIgnoringModifiers);
|
||||
|
||||
if (character != characterIgnoringModifiers) {
|
||||
// 48 === '0', 57 === '9'
|
||||
if (characterIgnoringModifiers >= 48 && characterIgnoringModifiers <= 57) {
|
||||
if (isdigit(characterIgnoringModifiers)) {
|
||||
// The character is a number so lets not mutate it with the modifiers
|
||||
character = characterIgnoringModifiers;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user