forked from M-Labs/humpback-dds
flash_gen: fix endianness
This commit is contained in:
parent
f1069d951d
commit
8ce3200b5d
2
flash.py
2
flash.py
@ -25,7 +25,7 @@ def write_record(f, key, value):
|
|||||||
key_size = len(key) + 1
|
key_size = len(key) + 1
|
||||||
value_size = len(value)
|
value_size = len(value)
|
||||||
record_size = key_size + value_size + 4
|
record_size = key_size + value_size + 4
|
||||||
f.write(struct.pack("<l", record_size))
|
f.write(struct.pack(">l", record_size))
|
||||||
f.write(key.encode())
|
f.write(key.encode())
|
||||||
f.write(b"\x00")
|
f.write(b"\x00")
|
||||||
f.write(value)
|
f.write(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user