summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/chessbox_pgn.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chessbox/chessbox_pgn.c')
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c
index 6d18986f95..94bda2eaaa 100644
--- a/apps/plugins/chessbox/chessbox_pgn.c
+++ b/apps/plugins/chessbox/chessbox_pgn.c
@@ -527,7 +527,8 @@ void coords_to_pgn(struct pgn_ply_node* ply){
527 } 527 }
528} 528}
529 529
530char * get_game_text(int selected_item, void *data, char *buffer){ 530char * get_game_text(int selected_item, void *data,
531 char *buffer, size_t buffer_len){
531 int i; 532 int i;
532 struct pgn_game_node *temp_node = (struct pgn_game_node *)data; 533 struct pgn_game_node *temp_node = (struct pgn_game_node *)data;
533 char text_buffer[50]; 534 char text_buffer[50];
@@ -541,7 +542,7 @@ char * get_game_text(int selected_item, void *data, char *buffer){
541 rb->snprintf(text_buffer, 50,"%s vs. %s (%s)", temp_node->white_player, 542 rb->snprintf(text_buffer, 50,"%s vs. %s (%s)", temp_node->white_player,
542 temp_node->black_player, temp_node->game_date); 543 temp_node->black_player, temp_node->game_date);
543 544
544 rb->strcpy(buffer, text_buffer); 545 rb->strncpy(buffer, text_buffer, buffer_len);
545 return buffer; 546 return buffer;
546} 547}
547 548