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[@]}"
|
||||
do
|
||||
field_type="${fields[$field_name]}"
|
||||
unpacks+="\n @$field_name = u.get_$field_type"
|
||||
if [ "$field_type" == "bool" ]
|
||||
then
|
||||
unpacks+="\n @$field_name = u.get_int"
|
||||
else
|
||||
unpacks+="\n @$field_name = u.get_$field_type"
|
||||
fi
|
||||
done
|
||||
replace_line "$tmpfile" Unpacker.new " u = Unpacker.new(data)$unpacks"
|
||||
|
||||
|
|
Loading…
Reference in a new issue