GPUDebug: Avoid using STREQ on StringRef

This might be dangerous because StringRef is not guaranteed to be
null-terminated and STREQ assumes null termination.
This commit is contained in:
2020-09-16 15:24:37 +02:00
parent fa81e36f65
commit 569e2e6dba

View File

@@ -88,7 +88,7 @@ bool GPU_debug_group_match(const char *ref)
} }
DebugStack &stack = ctx->debug_stack; DebugStack &stack = ctx->debug_stack;
for (StringRef &name : stack) { for (StringRef &name : stack) {
if (STREQ(name.data(), ref)) { if (name == ref) {
return true; return true;
} }
} }