#2599 ConstBuf fields

SlimerDude Thu 9 Mar 2017

Just to say that the fields of Buf don't seem to get copied over when made immutable:

fansh> buf := Buf { endian = Endian.little }
MemBuf(pos=0 size=0)

fansh> buf.toImmutable.endian
big


fansh> buf = Buf { charset = Charset.utf16BE }
MemBuf(pos=0 size=0)

fansh> buf.toImmutable.charset
UTF-8

brian Fri 10 Mar 2017

Thanks for reporting, I pushed a fix

Login or Signup to reply.