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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user