diff --git a/src/plugins/streamers/gds2/db_plugin/dbGDS2Writer.cc b/src/plugins/streamers/gds2/db_plugin/dbGDS2Writer.cc index b5bcd2626..b3911f9da 100644 --- a/src/plugins/streamers/gds2/db_plugin/dbGDS2Writer.cc +++ b/src/plugins/streamers/gds2/db_plugin/dbGDS2Writer.cc @@ -107,7 +107,7 @@ GDS2Writer::write_double (double d) tl_assert (e >= -64 && e < 64); b[0] |= ((e + 64) & 0x7f); - uint64_t m = uint64_t (d + 0.5); + uint64_t m = uint64_t (round (d)); for (int i = 7; i > 0; --i) { b[i] = (m & 0xff); m >>= 8;