From ebbf578b6c186f2ecc90900c34ed63ada632a093 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 23 Nov 2019 20:19:43 -0500 Subject: [PATCH] cs: fix `memset` address handling --- racket/src/cs/rumble/foreign.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/racket/src/cs/rumble/foreign.ss b/racket/src/cs/rumble/foreign.ss index 30f9f2d682..f333792029 100644 --- a/racket/src/cs/rumble/foreign.ss +++ b/racket/src/cs/rumble/foreign.ss @@ -1276,11 +1276,11 @@ "destination" to)] [else (with-interrupts-disabled* - (let ([to (fx+ (cpointer*-address to) to-offset)]) + (let ([to (+ (cpointer*-address to) to-offset)]) (let loop ([to to] [len len]) (unless (fx= len 0) (foreign-set! 'unsigned-8 to 0 byte) - (loop (fx+ to 1) (fx- len 1))))))]))) + (loop (+ to 1) (fx- len 1))))))]))) (define/who memset (case-lambda