Fix #4795 - pcp for > 256 blocks

This commit is contained in:
pancake 2016-05-10 00:39:31 +02:00
parent eabe6512f2
commit cf94e318ac
2 changed files with 3 additions and 3 deletions

View File

@ -2865,7 +2865,7 @@ static int cmd_print(void *data, const char *input) {
((input[1]=='w')?R_PRINT_STRING_WIDE:0));
}
break;
case 'c': //pc
case 'c': // "pc"
r_print_code (core->print, core->offset, core->block, len, input[1]);
break;
case 'r': // "pr"

View File

@ -446,11 +446,11 @@ R_API void r_print_code(RPrint *p, ut64 addr, ut8 *buf, int len, char lang) {
break;
case 'P':
case 'p':
p->cb_printf ("import struct\nbuf = struct.pack (\"%dB\", ", len);
p->cb_printf ("import struct\nbuf = struct.pack (\"%dB\", *[", len);
for (i=0; !p->interrupt && i<len; i++) {
if (!(i%w)) p->cb_printf ("\n");
r_print_cursor (p, i, 1);
p->cb_printf ("0x%02x%c", buf[i], (i+1<len)?',':')');
p->cb_printf ("0x%02x%s", buf[i], (i+1<len)?",":"])");
r_print_cursor (p, i, 0);
}
p->cb_printf ("\n");