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);
|
&characterIgnoringModifiers);
|
||||||
|
|
||||||
if (character != characterIgnoringModifiers) {
|
if (character != characterIgnoringModifiers) {
|
||||||
// 48 === '0', 57 === '9'
|
if (isdigit(characterIgnoringModifiers)) {
|
||||||
if (characterIgnoringModifiers >= 48 && characterIgnoringModifiers <= 57) {
|
|
||||||
// The character is a number so lets not mutate it with the modifiers
|
// The character is a number so lets not mutate it with the modifiers
|
||||||
character = characterIgnoringModifiers;
|
character = characterIgnoringModifiers;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue