Skip to content

Commit

Permalink
fix CyclePadding(::DataType) (#50719)
Browse files Browse the repository at this point in the history
We probably want to add a test for this code path.
  • Loading branch information
aviatesk authored Jul 31, 2023
1 parent 6f0a9e5 commit f4cb8bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/reinterpretarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ function CyclePadding(T::DataType)
a, s = datatype_alignment(T), sizeof(T)
as = s + (a - (s % a)) % a
pad = padding(T)
s != as && push!(pad, Padding(s, as - s))
if s != as
pad = Core.svec(pad..., Padding(s, as - s))
end
CyclePadding(pad, as)
end

Expand Down

0 comments on commit f4cb8bc

Please sign in to comment.