Commit c5c670c0 authored by Dan Lipsa's avatar Dan Lipsa

Use a standard 4 byte unsigned int instead of long.

parent 867c2066
......@@ -131,7 +131,7 @@ float vtkSegYIOUtils::readIBMFloat(std::ifstream& in)
// More details at
// https://en.m.wikipedia.org/wiki/IBM_Floating_Point_Architecture
long* longbuffer = reinterpret_cast<long*>(buffer);
uint32_t* longbuffer = reinterpret_cast<uint32_t*>(buffer);
int sign = longbuffer[0] >> 31 & 0x01;
int exponent = longbuffer[0] >> 24 & 0x7F;
float fraction = (longbuffer[0] & 0x00ffffff) / powf(2.0f, 24.0f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment