Unpack bool as int
This commit is contained in:
parent
92e7400796
commit
096fa110a6
|
@ -347,7 +347,12 @@ function action_generate() {
|
||||||
for field_name in "${!fields[@]}"
|
for field_name in "${!fields[@]}"
|
||||||
do
|
do
|
||||||
field_type="${fields[$field_name]}"
|
field_type="${fields[$field_name]}"
|
||||||
|
if [ "$field_type" == "bool" ]
|
||||||
|
then
|
||||||
|
unpacks+="\n @$field_name = u.get_int"
|
||||||
|
else
|
||||||
unpacks+="\n @$field_name = u.get_$field_type"
|
unpacks+="\n @$field_name = u.get_$field_type"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
replace_line "$tmpfile" Unpacker.new " u = Unpacker.new(data)$unpacks"
|
replace_line "$tmpfile" Unpacker.new " u = Unpacker.new(data)$unpacks"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue