VirtualBox

Ignore:
Timestamp:
Aug 15, 2022 1:53:49 PM (2 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strtofloat.cpp

    r96194 r96222  
    685685#if defined(RT_COMPILER_WITH_128BIT_LONG_DOUBLE)
    686686    if (iRetType == RET_TYPE_LONG_DOUBLE)
    687     {
    688687        uHiNum &= g_fNanMasks[RET_TYPE_LONG_DOUBLE];
    689         if (!uLoNum && !uHiNum)
    690             uLoNum = 1; /* must not be zero, or it'll turn into an infinity */
    691     }
    692688    else
    693689#endif
     
    695691        uHiNum  = 0;
    696692        uLoNum &= g_fNanMasks[iRetType];
    697         if (!uLoNum)
    698             uLoNum = 1; /* must not be zero, or it'll turn into an infinity */
    699     }
     693    }
     694    if (!uLoNum && !uHiNum && !fQuiet)
     695        uLoNum = 1; /* must not be zero, or it'll turn into an infinity */
    700696
    701697    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette