From 206f405a659331dbb11473051ffb064c10dab087 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 2 Jul 2017 19:46:56 -0700 Subject: [PATCH] nitfix --- pitfall/restructure/lazy-array.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pitfall/restructure/lazy-array.rkt b/pitfall/restructure/lazy-array.rkt index 9b4f2db9..5c69ab1f 100644 --- a/pitfall/restructure/lazy-array.rkt +++ b/pitfall/restructure/lazy-array.rkt @@ -31,10 +31,11 @@ https://github.com/mbutterick/restructure/blob/master/src/LazyArray.coffee (inherit-field len type) (define/override (decode stream [parent #f]) + (define pos (· stream pos)) ; ! placement matters. `resolve-length` will change `pos` (define decoded-len (resolve-length len stream parent)) (let ([parent (if (NumberT? len) (mhasheq 'parent parent - '_startOffset (· stream pos) + '_startOffset pos '_currentOffset 0 '_length len) parent)])