From fe380e8ba58e0384ae0628519a3a97f7643efa47 Mon Sep 17 00:00:00 2001 From: Oliver Bock <oliver.bock@aei.mpg.de> Date: Wed, 23 Mar 2011 08:41:25 +0100 Subject: [PATCH] Fixed device selection while debugging --- example/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/main.cpp b/example/main.cpp index e57f241..e38c80a 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -824,7 +824,7 @@ int main (int argc, char * const argv[]) { device_id = NULL; unsigned int i = 0; - if (argc == 3) { + if (argc >= 3) { cl_bool available; err = clGetDeviceInfo(device_ids[atoi(argv[2])], CL_DEVICE_AVAILABLE, sizeof(cl_bool), &available, NULL); if(err) { -- GitLab