Berry fix corruption in debug (#18475)

This commit is contained in:
s-hadinger 2023-04-21 23:05:25 +02:00 committed by GitHub
parent d9eeb8bf57
commit 045f8b4aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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