mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
fix #1298
This commit is contained in:
parent
43d891503e
commit
e46f183b7c
@ -1054,18 +1054,24 @@ R_API int r_core_visual_cmd(RCore *core, int ch) {
|
||||
break;
|
||||
case 'G':
|
||||
ret = 0;
|
||||
int scols = r_config_get_i (core->config, "hex.cols");
|
||||
if (core->io->va) {
|
||||
ut64 offset = r_io_section_get_vaddr (core->io, 0);
|
||||
if (offset == UT64_MAX) {
|
||||
offset = r_io_desc_size (core->io, core->file->desc) - core->blocksize;
|
||||
offset = r_io_desc_size (core->io,
|
||||
core->file->desc)
|
||||
- core->blocksize + 2*scols;
|
||||
ret = r_core_seek (core, offset, 1);
|
||||
} else {
|
||||
offset += r_io_desc_size (core->io, core->file->desc) - core->blocksize;
|
||||
offset += r_io_desc_size (core->io,
|
||||
core->file->desc)
|
||||
- core->blocksize + 2*scols;
|
||||
ret = r_core_seek (core, offset, 1);
|
||||
}
|
||||
} else {
|
||||
ret = r_core_seek (core,
|
||||
r_io_desc_size (core->io, core->file->desc) - core->blocksize, 1);
|
||||
r_io_desc_size (core->io, core->file->desc)
|
||||
- core->blocksize + 2*scols, 1);
|
||||
}
|
||||
if (ret != -1)
|
||||
r_io_sundo_push (core->io, core->offset);
|
||||
|
Loading…
Reference in New Issue
Block a user