Fix handling of empty struct fields

Structs can have singleton fields that take up no space.
This commit is contained in:
TEC 2024-04-08 18:12:57 +08:00
parent ae3e6b7403
commit 7dd9352d70
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ function memorylayout(io::IO, type::DataType)
bars = AnnotatedString[]
descs = AnnotatedString[]
for (; i, size, contentsize, ispointer) in si
size == 0 && continue
color = FACE_CYCLE[i % length(FACE_CYCLE) + 1]
width = max(2, memscale * size÷memstep)
color = FACE_CYCLE[i % length(FACE_CYCLE) + 1]