From: Marcus Comstedt Date: Mon, 27 Nov 2017 09:54:35 +0000 (+0100) Subject: i2s: Fix unportable use of struct.pack X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=30c855f60df2ae5d2edc568c51920f215ab38e0c;p=libsigrokdecode.git i2s: Fix unportable use of struct.pack Using the format string 'I' with the default (implied) prefix '@' results in both word size and endianness being platform dependent. In this case standard size (32 bits) and little endianness is required, so the prefix '<' needs to be used. --- diff --git a/decoders/i2s/pd.py b/decoders/i2s/pd.py index 0590797..beee079 100644 --- a/decoders/i2s/pd.py +++ b/decoders/i2s/pd.py @@ -122,7 +122,7 @@ class Decoder(srd.Decoder): return h def wav_sample(self, sample): - return struct.pack('I', self.data) + return struct.pack('