Skip to content

Commit

Permalink
tools: tplgtool2: Fix array size calculation for enum values
Browse files Browse the repository at this point in the history
Convert the computed value to integer to set the values array size for
parsing the enum controls properly.

Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
ranj063 committed Sep 7, 2024
1 parent cad9cef commit 8a24122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tplgtool2.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def __init__(self):
"mask" / Int32ul,
"count" / Int32ul,
"texts" / Array(self._num_texts, String(self._id_name_maxlen, "ascii")),
"values" / Array(self._num_texts * self._id_name_maxlen / 4, Int32ul),
"values" / Array(int(self._num_texts * self._id_name_maxlen / 4), Int32ul),
"priv" / self._private_raw,
)
self._bytes_control_body = Struct( # `snd_soc_tplg_bytes_control` without `hdr`
Expand Down

0 comments on commit 8a24122

Please sign in to comment.