Skip to content

Commit f4cb8bc

Browse files
authored
fix CyclePadding(::DataType) (#50719)
We probably want to add a test for this code path.
1 parent 6f0a9e5 commit f4cb8bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

base/reinterpretarray.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,9 @@ function CyclePadding(T::DataType)
720720
a, s = datatype_alignment(T), sizeof(T)
721721
as = s + (a - (s % a)) % a
722722
pad = padding(T)
723-
s != as && push!(pad, Padding(s, as - s))
723+
if s != as
724+
pad = Core.svec(pad..., Padding(s, as - s))
725+
end
724726
CyclePadding(pad, as)
725727
end
726728

0 commit comments

Comments
 (0)