From a8a209550baebcdd58717fff8205576a05e8b888 Mon Sep 17 00:00:00 2001 From: James Westman Date: Tue, 18 Oct 2022 15:02:31 -0500 Subject: [PATCH] typelib: Fix big-endian architectures --- blueprintcompiler/typelib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprintcompiler/typelib.py b/blueprintcompiler/typelib.py index e8b9152..0946320 100644 --- a/blueprintcompiler/typelib.py +++ b/blueprintcompiler/typelib.py @@ -17,7 +17,7 @@ # # SPDX-License-Identifier: LGPL-3.0-or-later - +import sys import typing as T import math from ctypes import * @@ -241,7 +241,7 @@ class Typelib: return self._typelib_file[loc:end].decode("utf-8") def _int(self, size, signed): - return int.from_bytes(self._typelib_file[self._offset:self._offset + size], 'little') + return int.from_bytes(self._typelib_file[self._offset:self._offset + size], sys.byteorder) class TypelibHeader(Typelib):