From 9fe121f591ccced9d41c55ab365b8396500732e5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Sat, 25 Jan 2020 21:07:24 +1030 Subject: [PATCH] Fix the pointer array allocation length. --- src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java b/src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java index ef55f67..ef63a40 100644 --- a/src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java +++ b/src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java @@ -220,7 +220,7 @@ public class CLProgram extends CLObject { try (api.Allocator a = api.Memory.stack(); MemorySegment seg = MemorySegment.allocateNative(size)) { MemoryAddress data = seg.baseAddress(); - MemoryAddress cptrs = a.alloca(size * 8); + MemoryAddress cptrs = a.alloca(sizes.length * 8); long off = 0; int res; -- 2.39.2