diff --git a/TODO b/TODO index 6ec59219fb..663f6bf75c 100644 --- a/TODO +++ b/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 ========= diff --git a/libr/print/print.c b/libr/print/print.c index 040ee2a5eb..f87538e7ac 100644 --- a/libr/print/print.c +++ b/libr/print/print.c @@ -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