diff options
author | David Phillips <david@sighup.nz> | 2017-08-10 12:01:45 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-08-10 12:01:45 +1200 |
commit | 6cfc8add274feadbe9357638ad83c207ddd39f4d (patch) | |
tree | 5be72e49ace549bb35511b9158c265476c853e55 | |
parent | 01aee2c35d987f3b2eb98e7ec5957d947f7f6a66 (diff) | |
download | fractal-gen-opencl-6cfc8add274feadbe9357638ad83c207ddd39f4d.tar.xz |
Fix off-by-one error in cl_error bounds checking
-rw-r--r-- | cl_error.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |