1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-20 21:10:09 +00:00

fix conversion in 32 bits architectures

This commit is contained in:
Carles Fernandez 2015-12-04 19:52:46 +01:00
parent 47d55c09f8
commit e47b5c003c

View File

@ -212,7 +212,9 @@ double Rtcm::bin_to_double(const std::string& s)
// Computing two's complement
boost::dynamic_bitset<> original_bitset(s);
original_bitset.flip();
reading_int = - (original_bitset.to_ulong() + 1);
std::string aux;
to_string(original_bitset, aux);
reading_int = - (strtoll(aux.c_str(), NULL, 2) + 1);
}
else
{