From d8a7d3e5fb0b2d7a86d26442357070934751b1cf Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 17 Oct 2011 01:21:36 -0700 Subject: [PATCH] FLO:DEFAULT-ENVIRONMENT must be reinitialized after the band is restored, since the answer might be different than it was when the band was created. --- src/runtime/floenv.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runtime/floenv.scm b/src/runtime/floenv.scm index a6d92f331..618e708b7 100644 --- a/src/runtime/floenv.scm +++ b/src/runtime/floenv.scm @@ -70,7 +70,7 @@ USA. (define (flo:default-environment) default-environment) -(define (initialize-package!) +(define (reset-package!) (set! default-environment (let ((environment (flo:environment))) (flo:set-rounding-mode! (flo:default-rounding-mode)) @@ -80,6 +80,10 @@ USA. (flo:set-environment! environment) environment*))) unspecific) + +(define (initialize-package!) + (reset-package!) + (add-event-receiver! event:after-restore reset-package!)) (define-primitives (float-rounding-modes 0) -- 2.25.1