mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 22:00:18 +00:00
* Fix byte selection in cursor mode (pd view)
This commit is contained in:
parent
b41f4b5380
commit
063d34066c
2
TODO
2
TODO
@ -10,8 +10,6 @@ TODO 0.6
|
||||
pancake
|
||||
* fix eflags string and str_bits
|
||||
* fix arm assembler issue reported via twitter (umf :/)
|
||||
nibble
|
||||
* mach0 armthumb bin detect
|
||||
|
||||
Questions
|
||||
=========
|
||||
|
@ -77,15 +77,15 @@ R_API void r_print_addr(RPrint *p, ut64 addr) {
|
||||
R_API char *r_print_hexpair(RPrint *p, const char *str, int n) {
|
||||
const char *s;
|
||||
char *d, *dst = (char *)malloc ((strlen (str)+2)*6);
|
||||
int ch, i = 0;
|
||||
int ch, i;
|
||||
/* XXX That's hacky as shit.. but partially works O:) */
|
||||
/* TODO: Use r_print_set_cursor for win support */
|
||||
int cur = R_MIN (p->cur, p->ocur);
|
||||
int ocur = R_MAX (p->cur, p->ocur);
|
||||
|
||||
if (p->cur_enabled && cur==-1) {
|
||||
if (p->cur_enabled && cur==-1)
|
||||
cur = ocur;
|
||||
ocur++;
|
||||
}
|
||||
ocur++;
|
||||
#if CURDBG
|
||||
sprintf(dst, "(%d/%d/%d/%d)", p->cur_enabled, cur, ocur, n);
|
||||
d = dst+ strlen(dst);
|
||||
@ -95,11 +95,11 @@ d = dst;
|
||||
// XXX: overflow here
|
||||
#define memcat(x,y) { memcpy(x,y,strlen(y));x+=strlen(y); }
|
||||
//for (s=str, d=dst; *s; s+=2, d+=2, i++) {
|
||||
for (s=str ; *s; s+=2, d+=2, i++) {
|
||||
for (s=str, i=0 ; *s; s+=2, d+=2, i++) {
|
||||
if (p->cur_enabled) {
|
||||
if (i-1==(cur-n))
|
||||
if (i==ocur-n)
|
||||
memcat (d, "\x1b[27m");
|
||||
if (i>=(cur-n) && i<(ocur-n))
|
||||
if (i>=cur-n && i<ocur-n)
|
||||
memcat (d, "\x1b[7m");
|
||||
}
|
||||
if (s[0]=='0' && s[1]=='0') {
|
||||
|
Loading…
Reference in New Issue
Block a user