From 6071102c9051d6653b1ee93e641a0c7479977c90 Mon Sep 17 00:00:00 2001 From: cuiziwei Date: Mon, 19 Aug 2024 11:39:32 +0800 Subject: [PATCH] nuttx/note:fix missing the last character when printing custom labels. Signed-off-by: cuiziwei --- drivers/note/noteram_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c index fa7ca7fdf3..5c552c2d2e 100644 --- a/drivers/note/noteram_driver.c +++ b/drivers/note/noteram_driver.c @@ -956,7 +956,7 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s, { FAR struct note_binary_s *nbi = (FAR struct note_binary_s *)p; char c = note->nc_type == NOTE_DUMP_BEGIN ? 'B' : 'E'; - int len = note->nc_length - sizeof(struct note_binary_s); + int len = note->nc_length - SIZEOF_NOTE_EVENT(0); uintptr_t ip; ip = nbi->nbi_ip;