diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2017-11-27 10:54:35 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-12-09 13:36:13 +0100 |
commit | 30c855f60df2ae5d2edc568c51920f215ab38e0c (patch) | |
tree | 44faefc0bfcef0496d5e35b4c9339563d1bf8805 /decoders/i2s/pd.py | |
parent | e0e7be8a2f9370032573bcb3b4e7f88b36a2ae2d (diff) | |
download | libsigrokdecode-30c855f60df2ae5d2edc568c51920f215ab38e0c.tar.gz libsigrokdecode-30c855f60df2ae5d2edc568c51920f215ab38e0c.zip |
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.
Diffstat (limited to 'decoders/i2s/pd.py')
-rw-r--r-- | decoders/i2s/pd.py | 2 |
1 files changed, 1 insertions, 1 deletions
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('<I', self.data) def decode(self): if not self.samplerate: |