We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a98cde4 commit 3386f13Copy full SHA for 3386f13
runtime/executor/method_meta.cpp
@@ -233,7 +233,11 @@ bool MethodMeta::uses_backend(const char* backend_name) const {
233
const auto delegates = s_plan_->delegates();
234
for (size_t i = 0; i < delegates->size(); i++) {
235
auto delegate = delegates->Get(i);
236
- if (std::strcmp(delegate->id()->c_str(), backend_name) == 0) {
+ auto backend_name_len = std::strlen(backend_name);
237
+ auto delegate_id_len = delegate->id()->size();
238
+ if (backend_name_len == delegate_id_len &&
239
+ std::strncmp(delegate->id()->c_str(), backend_name, backend_name_len) ==
240
+ 0) {
241
return true;
242
}
243
0 commit comments