From: notaz Date: Fri, 16 Oct 2015 21:46:55 +0000 (+0300) Subject: plugin: don't rename stdcall names X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a0df3103860ae32f3fac4d72f07d12e08886d4d;p=ia32rtools.git plugin: don't rename stdcall names func@4 and the likes --- diff --git a/ida/saveasm/saveasm.cpp b/ida/saveasm/saveasm.cpp index 5a6a2a6..38eb480 100644 --- a/ida/saveasm/saveasm.cpp +++ b/ida/saveasm/saveasm.cpp @@ -240,6 +240,7 @@ static void idaapi run(int /*arg*/) char buf[MAXSTR]; char buf2[MAXSTR]; const char *name; + const char *cp; struc_t *frame; func_t *func; ea_t ui_ea_block = 0, ea_size; @@ -524,8 +525,16 @@ static void idaapi run(int /*arg*/) // rename vars with '?@' (funcs are ok) int change_qat = 0; ea_flags = get_flags_novalue(ea); - if (!isCode(ea_flags) && strpbrk(name, "?@")) - change_qat = 1; + if (!isCode(ea_flags)) { + if (strchr(name, '?')) + change_qat = 1; + else if ((cp = strchr(name, '@'))) { + char *endp = NULL; + strtol(cp + 1, &endp, 10); + if (endp == NULL || *endp != 0) + change_qat = 1; + } + } if (need_rename || change_qat) { msg("%x: renaming name '%s'\n", ea, name);