From: Not Zed Date: Sat, 25 Jan 2020 10:37:24 +0000 (+1030) Subject: Fix the pointer array allocation length. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=9fe121f591ccced9d41c55ab365b8396500732e5;p=zcl Fix the pointer array allocation length. --- 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;