diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-06-09 22:32:34 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-07-03 16:01:01 +0000 |
commit | 8616b2112c0f24f71892488cefb146ae3505da9e (patch) | |
tree | 82cb2b4886272846b26864f14f2ba7421ae0e516 /src/corelib/tools/qlocale_tools.cpp | |
parent | c854fc5a6be1e94d2ea313a1d0ef637bc3df178f (diff) |
Fix parsing of 0E+1 and 0E-1 (capital 'E')
Since the result is an actual zero, this section of code looking for
underflows kicks in. But we forgot to take the capital letter into
account when parsing the number.
Task-number: QTBUG-61350
Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qlocale_tools.cpp')
-rw-r--r-- | src/corelib/tools/qlocale_tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp index 762f4f36dc..3e4f37501e 100644 --- a/src/corelib/tools/qlocale_tools.cpp +++ b/src/corelib/tools/qlocale_tools.cpp @@ -370,7 +370,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed, // if a digit before any 'e' is not 0, then a non-zero number was intended. ok = false; return 0.0; - } else if (num[i] == 'e') { + } else if (num[i] == 'e' || num[i] == 'E') { break; } } |