Unpack bool as int

This commit is contained in:
ChillerDragon 2022-11-15 11:09:54 +01:00
parent 92e7400796
commit 096fa110a6

View file

@ -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"