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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-16 16:24:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-16 16:24:37 +0300
commit569e2e6dbac489b4143859cfeb87debf7253eab6 (patch)
treec46b92f90d02c565a6c603c4786ddcd22fabfefa /source
parentfa81e36f65fce2e1080eb801bb381e0e0c462241 (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')
-rw-r--r--source/blender/gpu/intern/gpu_debug.cc2
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;
}
}