我正在尝试 Kaitai Struct 解码一些数据。我需要传递一个数组参数,但是 ksc 给出了一个错误。以下是示例代码:
meta:
id: cat_34
seq:
- id: test1
type: fixed([0,1,2])
types:
fixed:
params:
- id: f_size
#no type is just an array
seq:
- id: val
type: u1
repeat: expr
repeat-expr: f_size[1] #trying to use second value of array.
它给出以下错误: cat_34: /types/fixed/seq/0/repeat-expr: unable to apply operation [] to CalcBytesType