diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-16 16:24:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-16 16:24:37 +0300 |
commit | 569e2e6dbac489b4143859cfeb87debf7253eab6 (patch) | |
tree | c46b92f90d02c565a6c603c4786ddcd22fabfefa /source/blender/gpu | |
parent | fa81e36f65fce2e1080eb801bb381e0e0c462241 (diff) |
GPUDebug: Avoid using STREQ on StringRef
This might be dangerous because StringRef is not guaranteed to be
null-terminated and STREQ assumes null termination.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_debug.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_debug.cc b/source/blender/gpu/intern/gpu_debug.cc index 3d17b6f8649..d7944f0de50 100644 --- a/source/blender/gpu/intern/gpu_debug.cc +++ b/source/blender/gpu/intern/gpu_debug.cc @@ -88,7 +88,7 @@ bool GPU_debug_group_match(const char *ref) } DebugStack &stack = ctx->debug_stack; for (StringRef &name : stack) { - if (STREQ(name.data(), ref)) { + if (name == ref) { return true; } } |