Closed hopesea closed 8 years ago
I have found that if I define a non-byte virtual field within a record, then that virtual field impacts on the ouput when the record is written. For example
require 'bindata' class A < BinData::Record endian :big bit4 :f1 virtual :f1_mod, :value => lambda { f1 + 1} bit4 :f2 bit8 :f3 end input = StringIO.new("@@") output = StringIO.new("",'wb') tst = A.read(input) tst.write(output) puts "input: #{input.string}" puts tst puts "output: #{output.string}"
Thanks for the report. Fixed in bindata v2.3.1.
I have found that if I define a non-byte virtual field within a record, then that virtual field impacts on the ouput when the record is written. For example