Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-09-15 11:53:38 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-15 12:42:53 +0300
commit0c5ff0e55857f52a48506368c6b9b22288a7e95e (patch)
tree9477e5423de750f7d470d0fbf9427d653268cfc4 /source/blender/gpu/intern/gpu_codegen.c
parent028c5592cd80469c695fba9cd5276bba354df2cd (diff)
GPUCodegen: Fix for loop overflow.
Fix asan error.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 871a754c23a..b5a7d751f2a 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -174,7 +174,7 @@ static void gpu_parse_functions_string(GHash *hash, char *code)
/* test for type */
type = GPU_NONE;
- for (i = 1; i <= 17; i++) {
+ for (i = 1; i < ARRAY_SIZE(GPU_DATATYPE_STR); i++) {
if (GPU_DATATYPE_STR[i] && gpu_str_prefix(code, GPU_DATATYPE_STR[i])) {
type = i;
break;