Fix the tp test

This commit is contained in:
pancake 2016-05-21 19:51:41 +02:00
parent 60b62560f1
commit 3c1462f876

View File

@ -378,12 +378,15 @@ static int cmd_type(void *data, const char *input) {
break;
}
break;
case 'p': {
const char *type = input + 2;
char *ptr = strchr (type, ' ');
if (ptr) {
*ptr++ = 0;
ut64 addr = r_num_math (core->num, ptr);
case 'p':
if (input[2]) {
ut64 addr = core->offset;
const char *type = input + 2;
char *ptr = strchr (type, ' ');
if (ptr) {
*ptr++ = 0;
addr = r_num_math (core->num, ptr);
}
char *fmt = r_anal_type_format (core->anal, type);
if (fmt) {
r_core_cmdf (core, "pf %s @ 0x%08" PFMT64x "\n", fmt, addr);
@ -393,7 +396,6 @@ static int cmd_type(void *data, const char *input) {
eprintf ("see t?\n");
break;
}
}
break;
case '-':
if (input[1] == '?') {