Skip to content

Commit

Permalink
remote: use snprintf for BOARD_IDENT in remote.c if PLATFORM_IDENT_DY…
Browse files Browse the repository at this point in the history
…NAMIC is defined
  • Loading branch information
Misaka0x2730 committed Oct 3, 2024
1 parent a4c7f4c commit 695e161
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@ static void remote_packet_process_general(char *packet, const size_t packet_len)
#if ENABLE_DEBUG == 1 && defined(PLATFORM_HAS_DEBUG)
debug_bmp = true;
#endif
#ifndef PLATFORM_IDENT_DYNAMIC
remote_respond_string(REMOTE_RESP_OK, BOARD_IDENT);
#else
snprintf(packet, GDB_PACKET_BUFFER_SIZE, BOARD_IDENT, platform_ident());
remote_respond_string(REMOTE_RESP_OK, packet);
#endif
break;
case REMOTE_TARGET_CLK_OE:
platform_target_clk_output_enable(packet[2] != '0');
Expand Down

0 comments on commit 695e161

Please sign in to comment.