QLocale: fix conversion of "\0" to double
That is not a valid conversion. An empty string is a valid conversion; a string containing a null should fail. Change-Id: Iea47e0f8fc8b40378df7fffd1624c088f3bd1b14 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
f50945b8fd
commit
f16613f7ef
@ -286,7 +286,7 @@ double qt_asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
|
||||
return needleLen == haystackLen && memcmp(needle, haystack, haystackLen) == 0;
|
||||
};
|
||||
|
||||
if (*num == '\0') {
|
||||
if (numLen == 0) {
|
||||
ok = false;
|
||||
processed = 0;
|
||||
return 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user