summaryrefslogtreecommitdiff
path: root/apps/plugins/shortcuts/shortcuts_view.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/shortcuts/shortcuts_view.c')
-rw-r--r--apps/plugins/shortcuts/shortcuts_view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c
index 503db56d30..5e7d9c2b00 100644
--- a/apps/plugins/shortcuts/shortcuts_view.c
+++ b/apps/plugins/shortcuts/shortcuts_view.c
@@ -39,7 +39,8 @@ static bool usb_connected = false;
39enum sc_list_action_type draw_sc_list(struct gui_synclist gui_sc); 39enum sc_list_action_type draw_sc_list(struct gui_synclist gui_sc);
40 40
41/* Will be passed sc_file* as data */ 41/* Will be passed sc_file* as data */
42char* build_sc_list(int selected_item, void *data, char *buffer); 42char* build_sc_list(int selected_item, void *data,
43 char *buffer, size_t buffer_len);
43 44
44/* Returns true iff we should leave the main loop */ 45/* Returns true iff we should leave the main loop */
45bool list_sc(bool is_editable); 46bool list_sc(bool is_editable);
@@ -91,17 +92,16 @@ enum sc_list_action_type draw_sc_list(struct gui_synclist gui_sc)
91} 92}
92 93
93 94
94char* build_sc_list(int selected_item, void *data, char *buffer) 95char* build_sc_list(int selected_item, void *data,
96 char *buffer, size_t buffer_len)
95{ 97{
96 char text_buffer[MAX_PATH];
97 sc_file_t *file = (sc_file_t*)data; 98 sc_file_t *file = (sc_file_t*)data;
98 99
99 if (!is_valid_index(file, selected_item)) { 100 if (!is_valid_index(file, selected_item)) {
100 return NULL; 101 return NULL;
101 } 102 }
102 sc_entry_t *entry = file->entries + selected_item; 103 sc_entry_t *entry = file->entries + selected_item;
103 rb->snprintf(text_buffer, sizeof(text_buffer), "%s", entry->disp); 104 rb->snprintf(buffer, buffer_len, "%s", entry->disp);
104 rb->strcpy(buffer, text_buffer);
105 return buffer; 105 return buffer;
106} 106}
107 107