Skip to content

Commit 71e1e60

Browse files
committed
fix
1 parent 8d8eb1f commit 71e1e60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/ui/view_x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ void view_review_show_with_intent_impl(unsigned int requireReply, const char *in
577577
snprintf(intro_msg_buf, sizeof(intro_msg_buf), "%s", first_line);
578578

579579
// Put "to {intent}" on second line
580-
const size_t max_intent_len = sizeof(intro_submsg_buf) - 4; // "to " + null terminator
580+
const size_t max_intent_len = sizeof(intro_submsg_buf) - 4; // Reserve 4 bytes: "to " (3) + null terminator (1)
581581
int ret = snprintf(intro_submsg_buf, sizeof(intro_submsg_buf), "to %.*s", (int)max_intent_len, intent);
582582

583583
// Check if truncation occurred and add ellipsis if needed

0 commit comments

Comments
 (0)