Fix the pointer array allocation length.
authorNot Zed <notzed@gmail.com>
Sat, 25 Jan 2020 10:37:24 +0000 (21:07 +1030)
committerNot Zed <notzed@gmail.com>
Sat, 25 Jan 2020 10:37:24 +0000 (21:07 +1030)
src/notzed.zcl/classes/au/notzed/zcl/CLProgram.java

index ef55f67..ef63a40 100644 (file)
@@ -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;