From 045f8b4aec50fb5cf3d44cfda110d24513dd6024 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 21 Apr 2023 23:05:25 +0200 Subject: [PATCH] Berry fix corruption in debug (#18475) --- lib/libesp32/berry/src/be_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libesp32/berry/src/be_debug.c b/lib/libesp32/berry/src/be_debug.c index 4cd44bf61..58f81f2b4 100644 --- a/lib/libesp32/berry/src/be_debug.c +++ b/lib/libesp32/berry/src/be_debug.c @@ -137,7 +137,7 @@ void be_print_inst(binstruction ins, int pc, void* fout) logbuf("%s", opc2str(op)); break; } - memcpy(__lbuf_tmp, __lbuf, strlen(__lbuf)); + memcpy(__lbuf_tmp, __lbuf, strlen(__lbuf)+1); logbuf("%s\n", __lbuf_tmp); if (fout) { be_fwrite(fout, __lbuf, strlen(__lbuf));