Skip to content

Conversation

@Deterous
Copy link
Member

Endianness of PS3/PS4 magic numbers either needs to be fixed in Models or Serialization.

// Deserialize the SFB
var sfb = data.ReadType<Models.PlayStation3.SFB>();
if (sfb?.Magic == SFBMagic)
if (sfb?.Magic != SFBMagic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once rebased, this is no longer needed.

var appPkgHeader = new Models.PlayStation4.AppPkgHeader();

// Try to parse the header
var header = data.ReadType<Models.PlayStation4.AppPkgHeader>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't do what you want. This will read, by default, using little-endian on the majority of platforms. Once rebased, you can look at SFO and SFB as examples of how to handle big-endian deserialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants