Skip to content

Commit

Permalink
Remove alignToByte() insertion logic when writing
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Aug 5, 2023
1 parent a477800 commit 8b258e2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions shared/src/main/scala/io/kaitai/struct/ClassCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,8 @@ class ClassCompiler(
}

def compileSeqWrite(seq: List[AttrSpec], defEndian: Option[FixedEndian]) = {
var wasUnaligned = false
seq.foreach { (attr) =>
val nowUnaligned = isUnalignedBits(attr.dataType)
if (wasUnaligned && !nowUnaligned)
lang.alignToByte(lang.normalIO)
lang.attrWrite(attr, attr.id, defEndian)
wasUnaligned = nowUnaligned
}
}

Expand Down

0 comments on commit 8b258e2

Please sign in to comment.