mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Show error when VA instructions cant be assembled
This commit is contained in:
parent
be60efe129
commit
afda57061c
@ -1166,9 +1166,12 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
|
||||
break;
|
||||
}
|
||||
I.buffer.data[I.buffer.length] = '\0';
|
||||
if (cb && !cb (user, I.buffer.data)) {
|
||||
I.buffer.data[0] = 0;
|
||||
I.buffer.length = 0;
|
||||
if (cb) {
|
||||
int cbret = cb (user, I.buffer.data);
|
||||
if (cbret == 0) {
|
||||
I.buffer.data[0] = 0;
|
||||
I.buffer.length = 0;
|
||||
}
|
||||
}
|
||||
#if USE_UTF8
|
||||
utflen = r_line_readchar_utf8 ((ut8 *) buf, sizeof (buf));
|
||||
@ -1200,7 +1203,6 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
|
||||
printf ("\r\x1b[2K\r"); // %*c\r", columns, ' ');
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (*buf) {
|
||||
case 0: // control-space
|
||||
/* ignore atm */
|
||||
|
@ -306,9 +306,8 @@ static int cmd_seek_opcode_forward (RCore *core, int n) {
|
||||
int i, ret, val = 0;
|
||||
for (val = i = 0; i < n; i++) {
|
||||
RAnalOp op;
|
||||
|
||||
ret = r_anal_op (core->anal, &op,
|
||||
core->offset, core->block, core->blocksize, R_ANAL_OP_MASK_BASIC);
|
||||
ret = r_anal_op (core->anal, &op, core->offset, core->block,
|
||||
core->blocksize, R_ANAL_OP_MASK_BASIC);
|
||||
if (ret < 1) {
|
||||
ret = 1;
|
||||
}
|
||||
|
@ -82,5 +82,9 @@ R_API void r_core_visual_asm(RCore *core, ut64 off) {
|
||||
cva.acode->buf_hex, off);
|
||||
}
|
||||
}
|
||||
if (!cva.acode || cva.acode->len == 0) {
|
||||
eprintf ("ERROR: Cannot assemble those instructions\n");
|
||||
r_cons_any_key (NULL);
|
||||
}
|
||||
r_asm_code_free (cva.acode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user