Skip to content

Commit b01d359

Browse files
committed
JavaCL: fixed crash in CLPlatform.getBinaries()
1 parent c08ed3a commit b01d359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Core/src/main/velocity/com/nativelibs4java/opencl/CLProgram.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public Map<CLDevice, byte[]> getBinaries() throws CLBuildException {
462462
for (int i = 0; i < n; i++) {
463463
binPtrs.setPointerAtIndex(i, binMems[i] = allocateBytes(sizes[i]));
464464
}
465-
error(infos.getInfo(getEntity(), CL_PROGRAM_BINARIES, binPtrs.getValidBytes(), binPtrs, null));
465+
error(infos.getInfo(getEntity(), CL_PROGRAM_BINARIES, n * Pointer.SIZE, binPtrs, null));
466466

467467
Map<CLDevice, byte[]> ret = new HashMap<CLDevice, byte[]>(devices.length);
468468
int iBin = n == devices.length + 1 ? 1 : 0;

0 commit comments

Comments
 (0)