Skip to content

Commit

Permalink
Merge pull request #151 from obsidiansystems/buffer_fix
Browse files Browse the repository at this point in the history
Fix buffer corruption bug
  • Loading branch information
Jacquin Mininger authored Jul 1, 2020
2 parents 1f191ba + 0a84eb7 commit b6e5da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui_nano_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void ui_prompt(const char *const *labels, ui_callback_t ok_c, ui_callback_t cxl_
const char *const label = (const char *)PIC(labels[i]);
if (strlen(label) > sizeof(G.prompt.screen[i].prompt)) THROW(EXC_MEMORY_ERROR);
strcpy(G.prompt.screen[offset + i].prompt, label);

memset(G.prompt.screen[offset + i].value, 0, sizeof(G.prompt.screen[offset + 1].value));
G.prompt.callbacks[i](G.prompt.screen[offset + i].value, sizeof(G.prompt.screen[offset + i].value), G.prompt.callback_data[i]);
}

Expand Down

0 comments on commit b6e5da9

Please sign in to comment.