Handle long entitlements section in NPTicket 2.1 tickets (#1089)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled

* Handle long entitlements section in NPTicket 2.1 tickets

* Remove previous padding as it's no longer needed.

* Add back one bit of padding as it was needed

* Get Qodana to quit it's whining

* More Qodana blugeoning
This commit is contained in:
Henry Asbridge 2025-04-19 19:27:31 +01:00 committed by GitHub
parent b428b35f3d
commit df7ebf977a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,8 @@ jobs:
contents: write
pull-requests: write
checks: write
security-events: write
actions: read
steps:
- uses: actions/checkout@v3
with:

View file

@ -29,8 +29,10 @@ public class TicketParser21 : ITicketParser
this.reader.ReadTicketUInt32(); // status
SectionHeader entitlementsSection = this.reader.ReadSectionHeader(); // entitlements section
this.reader.SkipBytes(entitlementsSection.Length);
this.reader.ReadTicketEmpty(); // padding
this.reader.ReadTicketEmpty();
SectionHeader footer = this.reader.ReadSectionHeader(); // footer header
if (footer.Type != SectionType.Footer)