From be421cf23358c760c236b330cd4b04f24cb0258c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 15 Feb 2021 18:38:41 +0100 Subject: low: make-cstr-array: Fix NULL termination. * drmaa/v1/low.scm (make-cstr-array): Multiply index by pointer size. --- drmaa/v1/low.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drmaa/v1/low.scm b/drmaa/v1/low.scm index 7a82cc1..93f7f42 100644 --- a/drmaa/v1/low.scm +++ b/drmaa/v1/low.scm @@ -92,7 +92,7 @@ STRING-LIST." (bv-set! bv (* (sizeof '*) index) address)) addresses (iota n)) ;; The vector must be NULL-terminated - (bv-set! bv (1+ n) 0) + (bv-set! bv (* (1+ n) (sizeof '*)) 0) bv)) (define-syntax-rule (return ret success error-message) -- cgit v1.2.3