From 8cebeebfc41a0a6acf4dac4e60130991bc235e67 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 12 Jun 2017 16:24:42 -0700 Subject: [PATCH] correct var name --- pitfall/restructure/number.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pitfall/restructure/number.rkt b/pitfall/restructure/number.rkt index 7c9c1e80..2892d2a0 100644 --- a/pitfall/restructure/number.rkt +++ b/pitfall/restructure/number.rkt @@ -33,11 +33,11 @@ https://github.com/mbutterick/restructure/blob/master/src/Number.coffee (define/override (size . args) _size) (define-values (bound-min bound-max) - (let* ([unsigned-max (sub1 (expt 2 (sub1 (* _size 8))))] - [unsigned-min (sub1 (- unsigned-max))]) + (let* ([signed-max (sub1 (expt 2 (sub1 (* _size 8))))] + [signed-min (sub1 (- signed-max))]) (if _signed? - (values unsigned-min unsigned-max) - (values (- unsigned-min unsigned-min) (- unsigned-max unsigned-min))))) + (values signed-min signed-max) + (values (- signed-min signed-min) (- signed-max signed-min))))) (define/augment (decode stream . args) (define bstr (send stream read _size))