Skip to content

Commit de7a488

Browse files
committed
Handle ^C in repeated commands ##core
1 parent 1f83664 commit de7a488

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libr/core/cmd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,6 @@ static int cmd_interpret(void *data, const char *input) {
11901190
if (filter) {
11911191
*filter = 0;
11921192
}
1193-
11941193
int tmp_html = r_cons_singleton ()->is_html;
11951194
r_cons_singleton ()->is_html = 0;
11961195
ptr = str = r_core_cmd_str (core, inp);
@@ -1657,7 +1656,6 @@ static int cmd_resize(void *data, const char *input) {
16571656
eprintf ("r_io_resize: cannot resize\n");
16581657
}
16591658
}
1660-
16611659
if (newsize < core->offset+core->blocksize || oldsize < core->offset + core->blocksize) {
16621660
r_core_block_read (core);
16631661
}
@@ -2355,6 +2353,9 @@ static int r_core_cmd_subst(RCore *core, char *cmd) {
23552353
}
23562354
}
23572355
}
2356+
if (r_cons_is_breaked ()) {
2357+
break;
2358+
}
23582359
char *cr = strdup (cmdrep);
23592360
core->break_loop = false;
23602361
ret = r_core_cmd_subst_i (core, cmd, colon, (rep == orep - 1) ? &tmpseek : NULL);

libr/io/p/io_malloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static bool __check(RIO *io, const char *pathname, bool many) {
157157
}
158158

159159
static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
160-
if (__check (io, pathname,0)) {
160+
if (__check (io, pathname, 0)) {
161161
RIOMalloc *mal = R_NEW0 (RIOMalloc);
162162
if (!strncmp (pathname, "hex://", 6)) {
163163
mal->size = strlen (pathname);

0 commit comments

Comments
 (0)