From 75a945720aeb181f502795ac81fe0028794c37b3 Mon Sep 17 00:00:00 2001 From: Berthold Gunreben Date: Wed, 24 Jul 2024 21:57:28 +0200 Subject: [PATCH] Fix build and test for big-endian In dbfread, struct.unpack by default uses the machine local endianess. However, when using a big-endian machine, this leads to failures in the test suite. This change enforces the usage of little-endian in struct.unpack. --- dbfread/field_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbfread/field_parser.py b/dbfread/field_parser.py index b462a2d..cd55ccd 100644 --- a/dbfread/field_parser.py +++ b/dbfread/field_parser.py @@ -176,7 +176,7 @@ def parseN(self, field, data): def parseO(self, field, data): """Parse long field (O) and return float.""" - return struct.unpack('d', data)[0] + return struct.unpack('