Skip to content

Commit 4a955ec

Browse files
committed
add strlen
1 parent b27a746 commit 4a955ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
526526
bool found_arch_name = false;
527527
std::string string_name = std::string(name);
528528
// 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.
529-
bool is_internal_sw = string_name.compare(0, 15, VPR_INTERNAL_SWITCH_NAME) == 0;
529+
bool is_internal_sw = string_name.compare(0, strlen(VPR_INTERNAL_SWITCH_NAME), VPR_INTERNAL_SWITCH_NAME) == 0;
530530
for (const auto& arch_sw_inf: arch_switch_inf_) {
531531
if (string_name == arch_sw_inf.name || is_internal_sw) {
532532
found_arch_name = true;

0 commit comments

Comments
 (0)