Fix asm.immstr

This commit is contained in:
pancake 2017-11-14 03:59:24 +09:00
parent 4c7044e4d4
commit d43d2f738d
4 changed files with 11 additions and 5 deletions

View File

@ -2800,15 +2800,19 @@ static void ds_print_ptr(RDisasmState *ds, int len, int idx) {
}
ds->chref = 0;
if ((char)v > 0 && v >= '!' && v <= '~') {
{
ds->chref = (char)v;
ALIGN;
if (ds->immstr) {
char *str = r_str_from_ut64 (r_read_ble64(&v, core->print->big_endian));
ds_comment (ds, true, "; '%s'%s", str, nl);
char *str = r_str_from_ut64 (r_read_ble64 (&v, core->print->big_endian));
if (str && *str) {
ds_comment (ds, true, "; '%s'%s", str, nl);
}
free (str);
} else {
ds_comment (ds, true, "; '%c'%s", (char)v, nl);
if ((char)v > 0 && v >= '!' && v <= '~') {
ds_comment (ds, true, "; '%c'%s", (char)v, nl);
}
}
}
RList *list = NULL;

View File

@ -143,6 +143,7 @@ R_API RFSRoot* r_fs_mount(RFS* fs, const char* fstype, const char* path, ut64 de
}
eprintf ("r_fs_mount: Invalid mount point\n");
free (str);
free (heapFsType);
return NULL;
}
}

View File

@ -296,6 +296,7 @@ const char *msg =
char *row = r_str_newf ("0x%08"PFMT64x" - 0x%08" PFMT64x" %s %s\n", from, to, perm, "");
ptr = nl + 1;
res = r_str_append (res, row);
free (row);
}
free (wineDbgMaps);
return res;

View File

@ -84,7 +84,7 @@ gpt_partition_map_iterate (grub_disk_t disk,
sizeof (grub_gpt_partition_type_empty)))
{
/* Calculate the first block and the size of the partition. */
memset (&part, 0, sizeof (sizeof (struct grub_partition)));
memset (&part, 0, sizeof (struct grub_partition));
part.start = grub_le_to_cpu64 (entry.start);
part.len = (grub_le_to_cpu64 (entry.end)
- grub_le_to_cpu64 (entry.start) + 1);