mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-13 07:57:35 +00:00
Fix off by one conditional
This commit is contained in:
parent
0a7643c585
commit
71d0043773
@ -1088,7 +1088,7 @@ R_API void r_print_hexdump(RPrint *p, ut64 addr, const ut8 *buf, int len, int ba
|
|||||||
printfmt ("%4d ", w);
|
printfmt ("%4d ", w);
|
||||||
r_print_cursor (p, j, 1, 0);
|
r_print_cursor (p, j, 1, 0);
|
||||||
} else if (base == -10) {
|
} else if (base == -10) {
|
||||||
if (j + 2 < inc) {
|
if (j + 1 < inc) {
|
||||||
st16 w = r_read_ble16 (buf + j, p && p->big_endian);
|
st16 w = r_read_ble16 (buf + j, p && p->big_endian);
|
||||||
r_print_cursor (p, j, 2, 1);
|
r_print_cursor (p, j, 2, 1);
|
||||||
printfmt ("%7d ", w);
|
printfmt ("%7d ", w);
|
||||||
@ -1096,7 +1096,7 @@ R_API void r_print_hexdump(RPrint *p, ut64 addr, const ut8 *buf, int len, int ba
|
|||||||
}
|
}
|
||||||
j += 1;
|
j += 1;
|
||||||
} else if (base == 10) { // "pxd"
|
} else if (base == 10) { // "pxd"
|
||||||
if (j + 4 < inc) {
|
if (j + 3 < inc) {
|
||||||
int w = r_read_ble32 (buf + j, p && p->big_endian);
|
int w = r_read_ble32 (buf + j, p && p->big_endian);
|
||||||
r_print_cursor (p, j, 4, 1);
|
r_print_cursor (p, j, 4, 1);
|
||||||
printfmt ("%13d ", w);
|
printfmt ("%13d ", w);
|
||||||
|
Loading…
Reference in New Issue
Block a user