Skip to content

Commit

Permalink
novel: fix TWdOpeVar behavior for LNScript v100
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Oct 21, 2023
1 parent b9e5cbd commit b3de075
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/livemaker/lsb/novel.py
Expand Up @@ -427,9 +427,12 @@ class TWdOpeVar(BaseTWdGlyph):
type = TWdType.TWdOpeVar
_struct_fields = BaseTWdGlyph._struct_fields + construct.Struct(
"decorator" / construct.Int32sl,
"unk3" / construct.If(construct.this._._.version >= 100, construct.Int32ul),
"unk3" / construct.If(construct.this._._.version > 100, construct.Int32ul),
"link_name"
/ construct.If(100 <= construct.this._._.version < 105, construct.PascalString(construct.Int32ul, "cp932")),
/ construct.If(
construct.this._._.version < 105 and construct.this._._.version > 100,
construct.PascalString(construct.Int32ul, "cp932"),
),
"link" / construct.If(construct.this._._.version >= 105, construct.Int32sl),
"var_name_params" / construct.If(construct.this._._.version < 102, LiveParser._struct()),
"var_name"
Expand Down

0 comments on commit b3de075

Please sign in to comment.