Fixed issue with wrong floating point literal

pull/9908/head
Ryan Morse 2019-03-02 14:49:01 -08:00
parent 6d3ec4ca95
commit 20c2734e7b
2 changed files with 3 additions and 3 deletions

View File

@ -681,11 +681,11 @@ const char *UBUTest_CopyUtil()
return "CopyFloatToUint32 failed";
}
if(UsefulBufUtil_CopyDoubleToUint64(4e-40F) != 0X37C16C2800000000ULL) {
if(UsefulBufUtil_CopyDoubleToUint64(4e-40L) != 0X37C16C2800000000ULL) {
return "CopyDoubleToUint64 failed";
}
if(UsefulBufUtil_CopyUint64ToDouble(0X37C16C2800000000ULL) != 4e-40F) {
if(UsefulBufUtil_CopyUint64ToDouble(0X37C16C2800000000ULL) != 4e-40L) {
return "CopyUint64ToDouble failed";
}

View File

@ -379,7 +379,7 @@ int DoubleAsSmallestTest()
// 70 # text(16)
// 7375626E6F726D616C2073696E676C65 # "subnormal single"
// FB 37C16C2800000000 # primitive(4017611261645684736)
QCBOREncode_AddDoubleAsSmallestToMap(&EC, "subnormal single", 4e-40F);
QCBOREncode_AddDoubleAsSmallestToMap(&EC, "subnormal single", 4e-40L);
// 03 # unsigned(3)
// F9 C000 # primitive(49152)