mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-01 10:38:51 +00:00
Fixed "cmp" opcode colorization
This commit is contained in:
parent
8e2f68fbda
commit
e81d4e900d
@ -52,7 +52,7 @@ static char *filter_refline(const char *str) {
|
||||
|
||||
static void colorize_opcode (char *p, const char *reg, const char *num) {
|
||||
int i, j, k, is_mod;
|
||||
int is_jmp = (*p == 'j' || *p == 'c')? 1: 0;
|
||||
int is_jmp = (*p == 'j' || ((*p == 'c') && (p[1] == 'a')))? 1: 0;
|
||||
char *o;
|
||||
if (is_jmp)
|
||||
return;
|
||||
@ -80,8 +80,13 @@ static void colorize_opcode (char *p, const char *reg, const char *num) {
|
||||
strcpy (o+j, Color_RESET);
|
||||
j += strlen (Color_RESET);
|
||||
o[j++] = p[i];
|
||||
strcpy (o+j, reg);
|
||||
j += strlen (reg)-1;
|
||||
if ((p[i] > '0') && (p[i] < '9')) {
|
||||
strcpy (o+j, num);
|
||||
j += strlen (num)-1;
|
||||
} else {
|
||||
strcpy (o+j, reg);
|
||||
j += strlen (reg)-1;
|
||||
}
|
||||
continue;
|
||||
case ' ':
|
||||
// find if next ',' before ' ' is found
|
||||
|
Loading…
Reference in New Issue
Block a user