diff --git a/pitfall/restructure/struct.rkt b/pitfall/restructure/struct.rkt index 44343ea3..20a2fa31 100644 --- a/pitfall/restructure/struct.rkt +++ b/pitfall/restructure/struct.rkt @@ -91,7 +91,8 @@ https://github.com/mbutterick/restructure/blob/master/src/Struct.coffee (define ctx (mhasheq 'parent parent 'val val 'pointerSize 0)) - (+ (for/sum ([(key type) (in-dict fields)]) + (+ (for/sum ([(key type) (in-dict fields)] + #:when val) (send type size (ref val key) ctx)) (if include-pointers (· ctx pointerSize) 0)))