Skip to content

Commit

Permalink
add strlen
Browse files Browse the repository at this point in the history
  • Loading branch information
duck2 committed Aug 15, 2024
1 parent b27a746 commit 4a955ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
bool found_arch_name = false;
std::string string_name = std::string(name);
// The string name has the format of "Internal Switch/delay". So, I have to use compare to specify the portion I want to be compared.
bool is_internal_sw = string_name.compare(0, 15, VPR_INTERNAL_SWITCH_NAME) == 0;
bool is_internal_sw = string_name.compare(0, strlen(VPR_INTERNAL_SWITCH_NAME), VPR_INTERNAL_SWITCH_NAME) == 0;
for (const auto& arch_sw_inf: arch_switch_inf_) {
if (string_name == arch_sw_inf.name || is_internal_sw) {
found_arch_name = true;
Expand Down

0 comments on commit 4a955ec

Please sign in to comment.