potential fix for truncated float representation

This commit is contained in:
John
2022-01-16 20:00:39 +01:00
committed by GitHub
parent 29e96338da
commit 4bda1a5140
+2 -1
View File
@@ -34,6 +34,7 @@
namespace ebusd {
using std::dec;
using std::defaultfloat;
using std::hex;
using std::fixed;
using std::setfill;
@@ -731,7 +732,7 @@ result_t NumberDataType::readSymbols(size_t offset, size_t length, const SymbolS
if (result != RESULT_OK) {
return result;
}
*output << setw(0) << dec; // initialize output
*output << defaultfloat << setw(0) << dec; // initialize output
if (!hasFlag(REQ) && value == m_replacement) {
if (outputFormat & OF_JSON) {