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

Fix s+0x1000000000 ##shell #22998

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions libr/core/cmd_seek.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ static int cmd_seek(void *data, const char *input) {
break;
case '+': // "s+"
if (input[1] != '\0') {
int delta = off;
st64 delta = off;
if (input[1] == '+') {
delta = core->blocksize;
int mult = r_num_math (core->num, input + 2);
st64 mult = r_num_math (core->num, input + 2);
if (mult > 0) {
delta /= mult;
}
Expand Down
13 changes: 13 additions & 0 deletions test/db/cmd/cmd_seek
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,19 @@ EXPECT=<<EOF
EOF
RUN

NAME=relative large seek
FILE=-
CMDS=<<EOF
s
s+0x1000000000
s
EOF
EXPECT=<<EOF
0x0
0x1000000000
EOF
RUN

NAME=seek to bb start (sb)
FILE=bins/elf/vim
CMDS=<<EOF
Expand Down
Loading