From 7a0edd14026bdc0507ae24896b17cfcfbccf43b7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 2 Jul 2017 19:54:20 -0700 Subject: [PATCH] doublenit --- pitfall/restructure/struct.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)))