Skip to content

Commit

Permalink
refactor: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iadonkey authored Dec 8, 2023
1 parent ef94009 commit 27b154a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions TwinpackShared/LibraryReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,10 @@ public static LibraryInfo ReadProjectInformationBin(ZipArchive archive, List<str
properties[name] = stringTable[reader.ReadByte()];
break;
case PropertyType.Version:
var parts = reader.ReadByte() + 1; // not sure what this is
var parts = reader.ReadByte(); // not sure why this is needed from codesys
properties[name] = stringTable[reader.ReadByte()];
break;

// here is still something wrong ...
case PropertyType.LibraryCategories:

var guid = stringTable[reader.ReadByte()]; // For LibraryCategories this is System.Guid
var count = reader.ReadByte();

Expand Down Expand Up @@ -278,6 +275,7 @@ public static LibraryInfo ReadProjectInformationBin(ZipArchive archive, List<str
}
}

// not needed anymore
if (!properties.TryGetValue("Title", out string v) || string.IsNullOrEmpty(v))
_logger.Warn("Title was not parsed correctly");

Expand Down

0 comments on commit 27b154a

Please sign in to comment.