Closed dcurrie closed 3 years ago
Reviewing the code, I noticed this:
static float decode_befloat(const char *b) { float f = 0.; char *fb = (char *)&f; if (!is_bigendian()) { fb[0] = b[3]; fb[1] = b[2]; fb[2] = b[1]; fb[3] = b[0]; } return f; }
If is_bigendian() is true, this function always returns zero.
is_bigendian()
The same defect is in decode_bedouble.
decode_bedouble
Oh yeah that's a big goof. Let me fix this when I get some time; good catch!
Reviewing the code, I noticed this:
If
is_bigendian()
is true, this function always returns zero.The same defect is in
decode_bedouble
.