Skip to content

Commit

Permalink
Bring back init of instance flags in non-readWrite mode (C++, C#)
Browse files Browse the repository at this point in the history
(fix regression from d1f16dd)
  • Loading branch information
generalmimon committed Aug 1, 2023
1 parent 9142a1b commit 2eca3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/src/main/scala/io/kaitai/struct/ClassCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ class ClassCompiler(
curClass.params
)
compileInit(curClass)
curClass.instances.foreach { case (instName, _) => lang.instanceClear(instName) }
if (config.readWrite) {
curClass.instances.foreach { case (instName, instSpec) =>
lang.instanceClear(instName)
instSpec match {
case _: ParseInstanceSpec =>
lang.instanceWriteFlagInit(instName)
Expand Down

0 comments on commit 2eca3de

Please sign in to comment.