Skip to content

Commit 46901ab

Browse files
hrvoje-osecripatel-fd
authored andcommitted
Move index bounds check outside the conditional compilation flag
1 parent 9669deb commit 46901ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/disco/gui/fd_gui_peers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ fd_gui_peers_handle_gossip_update( fd_gui_peers_ctx_t * peers,
559559

560560
FD_LOG_ERR(( "invariant violation: update->contact_info.contact_info->pubkey.uc=%s != update->origin_pubkey=%s ", ci_pk, og_pk ));
561561
}
562-
if( FD_UNLIKELY( update->contact_info.idx>=FD_CONTACT_INFO_TABLE_SIZE ) ) FD_LOG_ERR(( "unexpected contact_info_idx %lu >= %lu", update->contact_info.idx, FD_CONTACT_INFO_TABLE_SIZE ));
563562
#endif
563+
if( FD_UNLIKELY( update->contact_info.idx>=FD_CONTACT_INFO_TABLE_SIZE ) ) FD_LOG_ERR(( "unexpected contact_info_idx %lu >= %lu", update->contact_info.idx, FD_CONTACT_INFO_TABLE_SIZE ));
564564
fd_gui_peers_node_t * peer = &peers->contact_info_table[ update->contact_info.idx ];
565565
if( FD_LIKELY( peer->valid ) ) {
566566
#if LOGGING

0 commit comments

Comments
 (0)