Skip to content

Commit 177a4cb

Browse files
committed
Update mphalport.c
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
1 parent 57b33e2 commit 177a4cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ports/esp32/mphalport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ void check_esp_err_(esp_err_t code, const char *func, const int line, const char
8585
char err_msg[64];
8686
esp_err_to_name_r(code, err_msg, sizeof(err_msg));
8787
vstr_t vstr;
88-
vstr_init(&vstr, 256);
88+
vstr_init(&vstr, 80);
8989
vstr_printf(&vstr, "0x%04X %s in function '%s' at line %d in file '%s'", code, err_msg, func, line, file);
90+
vstr_null_terminated_str(&vstr);
9091
o_str->data = (const byte *)vstr.buf;
9192
#else
9293
o_str->data = (const byte *)esp_err_to_name(code); // esp_err_to_name ret's ptr to const str

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy