summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-01-29 05:02:26 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-01-29 05:02:26 -0800
commit1fe922cd8b76cffdb15eac07f6e686449e1b1469 (patch)
tree911a15282124465444ed990bc17103105b32ac3b
parentceffc5bc20c1ab16c4d02e1d3ae8fcfb65557797 (diff)
Cytore values need to be _packed (I got lucky :D).
-rw-r--r--Cytore.hpp6
-rw-r--r--MobileCydia.mm4
2 files changed, 5 insertions, 5 deletions
diff --git a/Cytore.hpp b/Cytore.hpp
index 168f2ef..714da26 100644
--- a/Cytore.hpp
+++ b/Cytore.hpp
@@ -50,7 +50,7 @@ struct Header {
uint32_t version_;
uint32_t size_;
uint32_t reserved_;
-};
+} _packed;
template <typename Target_>
class Offset {
@@ -80,11 +80,11 @@ class Offset {
bool IsNull() const {
return offset_ == 0;
}
-};
+} _packed;
struct Block {
Cytore::Offset<void> reserved_;
-};
+} _packed;
template <typename Type_>
static _finline Type_ Round(Type_ value, Type_ size) {
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 32c0244..fd225d1 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -1420,14 +1420,14 @@ struct PackageValue :
char version_[8];
char name_[];
-};
+} _packed;
struct MetaValue :
Cytore::Block
{
uint32_t active_;
Cytore::Offset<PackageValue> packages_[1 << 16];
-};
+} _packed;
static Cytore::File<MetaValue> MetaFile_;
// }}}