From 6267f53eb3bba4678804b43f2bce7eafd4708404 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 28 Sep 2023 02:57:49 +1000 Subject: [PATCH] formats/uef_cas.cpp: Fixed regression reading floating-point values. --- src/lib/formats/uef_cas.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/formats/uef_cas.cpp b/src/lib/formats/uef_cas.cpp index cabac3a0ecdfd..f284af43035a2 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);