forked from facebook/redex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix endianness mistakes in ResourceTypes serialization
Summary: This is mostly an exercise in pedantry. If the host machine was not little endian, the serialization code here would likely produce garbage that failed to be read on Android devices. This diff makes the serialization code abide by a few conventions: 1) Reading header data from a raw pointer should use `dtoh` methods. 2) Feeding data directly into a header struct should be in device order. 3) Parameters to `push_short` and `push_long` helper methods should always be host order, because those methods swap the order. Differential Revision: D6654271 fbshipit-source-id: 8a52c07f25d00a03bdcc36239b8290908e952194
- Loading branch information
1 parent
db21690
commit 8718ebc
Showing
3 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters