summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-11-19 16:26:02 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2018-11-23 10:05:33 +0000
commitd8b401959f6f58bc80f767684b250dd4589735d6 (patch)
treea37f6beb8e3f2cb4dc1c6e9502428b1db6c27b39 /src
parentce159d1a3e48308d54300560f024e8501c1395c9 (diff)
Recognize E along with e as exponent character in asciiToDouble
Fixed a misguided condition in the check for bogus texts in the sscanf branch of the decoder; it checked for 'e' but neglected 'E', which is just as valid. Change-Id: I9236c76faea000c92df641930e401bce445e06c8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale_tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 4d969a4723..a315356a23 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -350,7 +350,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
ok = false;
for (int i = 0; i < processed; ++i) {
char c = num[i];
- if ((c < '0' || c > '9') && c != '.' && c != '-' && c != '+' && c != 'e') {
+ if ((c < '0' || c > '9') && c != '.' && c != '-' && c != '+' && c != 'e' && c != 'E') {
// Garbage found
processed = 0;
return 0.0;