Rename bigEndianToUnsignedInt to unsignedBigEndianToDouble.
diff --git a/ndn-cpp/c/encoding/BinaryXMLDecoder.c b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
index 2e65a85..b687357 100644
--- a/ndn-cpp/c/encoding/BinaryXMLDecoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
@@ -247,13 +247,13 @@
return 0;
}
-unsigned int ndn_BinaryXMLDecoder_bigEndianToUnsignedInt(unsigned char *bytes, unsigned int bytesLength)
+double ndn_BinaryXMLDecoder_unsignedBigEndianToDouble(unsigned char *bytes, unsigned int bytesLength)
{
- unsigned int result = 0;
+ double result = 0.0;
unsigned int i;
for (i = 0; i < bytesLength; ++i) {
- result <<= 8;
- result += (unsigned int)bytes[i];
+ result *= 256.0;
+ result += (double)bytes[i];
}
return result;