aboutsummaryrefslogtreecommitdiff
path: root/cl_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'cl_error.c')
-rw-r--r--cl_error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cl_error.c b/cl_error.c
index 293a3d8..55b91bd 100644
--- a/cl_error.c
+++ b/cl_error.c
@@ -77,7 +77,7 @@ static const char *cl_error_strings[] = {
const char *get_cl_error_string(cl_int error)
{
error = -error;
- if (error < 0 || error > sizeof(cl_error_strings) / sizeof(const char *))
+ if (error < 0 || error >= sizeof(cl_error_strings) / sizeof(const char *))
return "Error value out of bounds";
return cl_error_strings[error];