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));