diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2022-08-15 13:53:49 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2022-08-15 13:53:49 +0000 |
| commit | 9750730b34102f7223885520e297938583671878 (patch) | |
| tree | 329a98b5963f3c3dc4786f26a33d4b7352810db3 /src/VBox/Runtime/common/string/strtofloat.cpp | |
| parent | 50237ec68701f08b3ab6cbe3fcca131de4ec1e35 (diff) | |
| download | VirtualBox-svn-9750730b34102f7223885520e297938583671878.tar.gz | |
iprt/types.h,strtonum.cpp: QNAN values does not need to have bit zero set as they have the relevant highest bit set. bugref:10261
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@96222 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Runtime/common/string/strtofloat.cpp')
| -rw-r--r-- | src/VBox/Runtime/common/string/strtofloat.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/VBox/Runtime/common/string/strtofloat.cpp b/src/VBox/Runtime/common/string/strtofloat.cpp index bb7b1b94935..13c84bfdad0 100644 --- a/src/VBox/Runtime/common/string/strtofloat.cpp +++ b/src/VBox/Runtime/common/string/strtofloat.cpp @@ -684,19 +684,15 @@ static void rtStrParseNanTag(const char *pchTag, size_t cchTag, bool fPositive, Assert(iRetType < RT_ELEMENTS(g_fNanMasks)); #if defined(RT_COMPILER_WITH_128BIT_LONG_DOUBLE) if (iRetType == RET_TYPE_LONG_DOUBLE) - { uHiNum &= g_fNanMasks[RET_TYPE_LONG_DOUBLE]; - if (!uLoNum && !uHiNum) - uLoNum = 1; /* must not be zero, or it'll turn into an infinity */ - } else #endif { uHiNum = 0; uLoNum &= g_fNanMasks[iRetType]; - if (!uLoNum) - uLoNum = 1; /* must not be zero, or it'll turn into an infinity */ } + if (!uLoNum && !uHiNum && !fQuiet) + uLoNum = 1; /* must not be zero, or it'll turn into an infinity */ /* * Set the return value. |
