diff --git a/shard.yml b/shard.yml index 7fa5d4e..8658c08 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: bindata -version: 1.6.0 +version: 1.7.0 development_dependencies: ameba: diff --git a/src/bindata.cr b/src/bindata.cr index ecfd86d..cdf4e10 100644 --- a/src/bindata.cr +++ b/src/bindata.cr @@ -129,7 +129,7 @@ abstract class BinData {% elsif part[:type] == "enum" %} %value = io.read_bytes({{part[:cls]}}, __format__).to_i - @{{part[:name]}} = {{part[:encoding]}}.from_value(%value) + @{{part[:name]}} = {{part[:encoding]}}.new(%value) {% elsif part[:type] == "group" %} @{{part[:name]}} = {{part[:cls]}}.new