Skip to content

Commit

Permalink
Length fields should default to zero (#22)
Browse files Browse the repository at this point in the history
This fixes issue (#22). We choose not to remove the field as it's in the specs and migth be used in some archive files (while never saw it actually).
  • Loading branch information
martingalloar committed Jul 3, 2018
1 parent 5e29be3 commit 5c18f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pysap/SAPCAR.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class SAPCARArchiveFilev200Format(PacketNoPadded):
LEIntField("file_length_high", 0),
LELongField("timestamp", 0),
LEIntField("code_page", 0),
FieldLenField("user_info_length", None, length_of="user_info", fmt="<H"),
FieldLenField("filename_length", None, length_of="filename", fmt="<H"),
FieldLenField("user_info_length", 0, length_of="user_info", fmt="<H"),
FieldLenField("filename_length", 0, length_of="filename", fmt="<H"),
StrNullFixedLenField("filename", None, length_from=lambda x: x.filename_length,
null_terminated=lambda x: x.is_filename_null_terminated),
StrFixedLenField("user_info", None, length_from=lambda x: x.user_info_length),
Expand Down

0 comments on commit 5c18f9e

Please sign in to comment.