Changes in pd-x and handle .lsp files for newlisp r2pipe

This commit is contained in:
pancake 2015-04-08 15:39:25 +02:00
parent 375427cb8c
commit 595616de99
2 changed files with 15 additions and 2 deletions

View File

@ -369,8 +369,15 @@ R_API RList *r_core_asm_bwdisassemble (RCore *core, ut64 addr, int n, int len) {
if (!hits)
return NULL;
buf_addr = addr - len;
buf_len = len;
if (len>addr) {
buf_addr = 0;
buf_len = len-addr;
len = buf_len;
addr = n;
} else {
buf_addr = addr - len;
buf_len = len;
}
buf = (ut8 *)malloc (buf_len);
if (!buf) {

View File

@ -302,6 +302,12 @@ R_API int r_core_run_script (RCore *core, const char *file) {
r_lang_run_file (core->lang, cmd);
free (cmd);
ret = 1;
} else if (!strcmp (ext, "lsp")) {
char *cmd = r_str_newf ("newlisp -n '%s'", file);
r_lang_use (core->lang, "pipe");
r_lang_run_file (core->lang, cmd);
free (cmd);
ret = 1;
} else if (!strcmp (ext, "go")) {
char *cmd = r_str_newf ("go run '%s'", file);
r_lang_use (core->lang, "pipe");