Skip to content

Commit 3da3a22

Browse files
refactor: add enum vairables in TUI define.c (#5959)
1 parent fe2891e commit 3da3a22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

librz/core/tui/define.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ static void define_data_ntimes(RzCore *core, ut64 off, int times, int type) {
3030
}
3131
}
3232

33-
static bool isDisasmPrint(int mode) {
34-
return (mode == 1 || mode == 2);
33+
static bool is_visual_mode_disasm(RzCoreVisualMode mode) {
34+
return (mode == RZ_CORE_VISUAL_MODE_PD || mode == RZ_CORE_VISUAL_MODE_DB);
3535
}
3636

3737
static void handleHints(RzCore *core) {
@@ -220,7 +220,7 @@ RZ_IPI void rz_core_visual_define(RzCore *core, const char *args, int distance)
220220
case 'n': {
221221
RzAnalysisOp op = { 0 };
222222
ut64 tgt_addr = UT64_MAX;
223-
if (!isDisasmPrint(visual->printidx)) {
223+
if (!is_visual_mode_disasm(visual->printidx)) {
224224
break;
225225
}
226226
// TODO: get the aligned instruction even if the cursor is in the middle of it.
@@ -535,4 +535,4 @@ RZ_IPI void rz_core_visual_define(RzCore *core, const char *args, int distance)
535535
off += wordsize;
536536
goto onemoretime;
537537
}
538-
}
538+
}

0 commit comments

Comments
 (0)