Use the isdigit helper
This commit is contained in:
parent
29dbb93f16
commit
231d4f7581
1 changed files with 1 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue