From 4636efae2bc8ae80cb20b88b0f6bc76d2fed1f6f Mon Sep 17 00:00:00 2001 From: Michael Mc Donnell Date: Thu, 25 Aug 2016 21:50:45 -0700 Subject: [PATCH] [Bullet3OpenCL] Fix check for null-terminated string The code essentially dead because it was checking the pointer to an array for null. The check will alway return true. Instead the code was meant to check if the string had anything in it after the call to clGetDeviceInfo. --- src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp b/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp index 369f1d750..0287e0e5d 100644 --- a/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp +++ b/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp @@ -560,7 +560,7 @@ void b3OpenCLUtils_printDeviceInfo(cl_device_id device) b3Printf("\t\t\t\t\t3D_MAX_WIDTH\t %u\n", info.m_image3dMaxWidth); b3Printf("\t\t\t\t\t3D_MAX_HEIGHT\t %u\n", info.m_image3dMaxHeight); b3Printf("\t\t\t\t\t3D_MAX_DEPTH\t %u\n", info.m_image3dMaxDepth); - if (info.m_deviceExtensions != 0) + if (*info.m_deviceExtensions != 0) { b3Printf("\n CL_DEVICE_EXTENSIONS:%s\n",info.m_deviceExtensions); }