From feb0ee5dc9eb3ab94bf488b4f4c5a07999f6b1bb Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 14 Mar 2014 02:22:03 +0200 Subject: [PATCH] allow float type --- plugin/saveasm.cpp | 5 ++++- tools/translate.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/saveasm.cpp b/plugin/saveasm.cpp index 48b21e4..aee282f 100644 --- a/plugin/saveasm.cpp +++ b/plugin/saveasm.cpp @@ -248,7 +248,10 @@ static void idaapi run(int /*arg*/) if (cmd.Operands[o].type == o_mem) { tmp_ea = cmd.Operands[o].addr; flags_t tmp_ea_flags = get_flags_novalue(tmp_ea); - if (!isUnknown(tmp_ea_flags)) { + // ..but base float is ok.. + int is_flt = isDwrd(tmp_ea_flags) || isFloat(tmp_ea_flags); + if (!is_flt && !isUnknown(tmp_ea_flags)) + { buf[0] = 0; get_name(ea, tmp_ea, buf, sizeof(buf)); msg("%x: undefining %x '%s'\n", ea, tmp_ea, buf); diff --git a/tools/translate.c b/tools/translate.c index 8d2fb6f..f1ea6f4 100644 --- a/tools/translate.c +++ b/tools/translate.c @@ -495,6 +495,7 @@ static int guess_lmod_from_c_type(enum opr_lenmod *lmod, "int", "_DWORD", "UINT_PTR", "DWORD", "WPARAM", "LPARAM", "UINT", "__int32", "LONG", "HIMC", "BOOL", "size_t", + "float", }; static const char *word_types[] = { "uint16_t", "int16_t", "_WORD", "WORD", -- 2.39.5