diff --git a/Source/Details/ASCollectionLayoutContext.mm b/Source/Details/ASCollectionLayoutContext.mm index 6f2ba7186..2d0b153f9 100644 --- a/Source/Details/ASCollectionLayoutContext.mm +++ b/Source/Details/ASCollectionLayoutContext.mm @@ -85,7 +85,9 @@ - (NSUInteger)hash { struct { CGSize viewportSize; - ASScrollDirection scrollableDirections; + // Fields must be aligned without padding, otherwise hash result will be different for the same + // struct. That's why we use NSUInteger instead of ASScrollDirection. + NSUInteger scrollableDirections; NSUInteger elementsHash; NSUInteger layoutDelegateClassHash; NSUInteger additionalInfoHash;