eProsima / Integration-Service

Apache License 2.0
66 stars 28 forks source link

float/double fields converted to string by xtypes_to_json when 0 #197

Open mac-apt opened 1 year ago

mac-apt commented 1 year ago

In this function float/double types get judged whether they should be converted to numerical or string JSON field according to result of std::isnormal. That causes zeroes to be converted to string also, and I don't see any reason for that. Is that a bug?

mac-apt commented 1 year ago

I've made a patch correcting this issue, feel free to use it. zero_float.patch