Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use blocksize to determine size for rz_cmd_disassembly_n_bytes_handler() #4714

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions librz/core/cmd/cmd_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -3262,11 +3262,7 @@ static bool core_disassembly(RzCore *core, int n_bytes, int n_instrs, RzCmdState
}

RZ_IPI RzCmdStatus rz_cmd_disassembly_n_bytes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state) {
if (argc <= 1) {
RZ_LOG_ERROR("Invalid number of arguments\n");
return RZ_CMD_STATUS_ERROR;
}
int n_bytes = (int)rz_num_math(core->num, argv[1]);
ut64 n_bytes = argc > 1 ? (int)rz_num_math(core->num, argv[1]) : core->blocksize;
wargio marked this conversation as resolved.
Show resolved Hide resolved
if (n_bytes == 0) {
RZ_LOG_ERROR("The argument cannot be zero\n");
return RZ_CMD_STATUS_ERROR;
Expand Down
Loading