diff options
author | 2023-09-28 02:57:49 +1000 | |
---|---|---|
committer | 2023-09-28 02:57:49 +1000 | |
commit | 6267f53eb3bba4678804b43f2bce7eafd4708404 (patch) | |
tree | bb7fdb6989940eb198c3c1f72d97230d0cc28c49 | |
parent | 1eba9aabed59548ddeba8d8585b56f805fd6ac7f (diff) |
formats/uef_cas.cpp: Fixed regression reading floating-point values.
-rw-r--r-- | src/lib/formats/uef_cas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/formats/uef_cas.cpp b/src/lib/formats/uef_cas.cpp index cabac3a0ecd..f284af43035 100644 --- a/src/lib/formats/uef_cas.cpp +++ b/src/lib/formats/uef_cas.cpp @@ -96,13 +96,13 @@ static float get_uef_float( const uint8_t *Float) was the first byte read from the UEF, Float[1] the second, etc */ /* decode mantissa */ - Mantissa = get_u24be(&Float[0]) | 0x800000; + Mantissa = get_u24le(&Float[0]) | 0x800000; Result = (float)Mantissa; Result = (float)ldexp(Result, -23); /* decode exponent */ - Exponent = (get_u16be(&Float[2])&0x7f80) >> 7; + Exponent = (get_u16le(&Float[2])&0x7f80) >> 7; Exponent -= 127; Result = (float)ldexp(Result, Exponent); |