mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-19 18:58:11 +02:00
util: allow for uppercase 'E' in safe_atod strings too
Fixes: 75d4acfe94 ("util: allow for 'e' in safe_atod strings")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1475>
This commit is contained in:
parent
089bc8ec81
commit
61b3b785ae
2 changed files with 2 additions and 0 deletions
|
|
@ -283,6 +283,7 @@ safe_atod(const char *str, double *val)
|
|||
case '-':
|
||||
case '.':
|
||||
case 'e':
|
||||
case 'E':
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1613,6 +1613,7 @@ START_TEST(safe_atod_test)
|
|||
{ "-2147483648", true, -2147483648 },
|
||||
{ "4294967295", true, 4294967295 },
|
||||
{ "-1.3e-1", true, -0.130},
|
||||
{ "1.5E2", true, 150.0},
|
||||
{ "0x0", false, 0 },
|
||||
{ "0x10", false, 0 },
|
||||
{ "0xaf", false, 0 },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue