diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index b4eb515feb0..8d0dbd41145 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -1053,6 +1053,9 @@ static void test_demangle(void) /* 118 */ {"?swprintf@@YAHPA_WIPB_WZZ", "int __cdecl swprintf(wchar_t *,unsigned int,wchar_t const *,...)"}, /* 119 */ {"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", "class std::complex & __ptr64 __cdecl std::operator*=(class std::complex & __ptr64,class std::complex const & __ptr64)"}, /* 120 */ {"?_Doraise@bad_cast@std@@MEBAXXZ", "protected: virtual void __cdecl std::bad_cast::_Doraise(void)const __ptr64"}, +/* 121 */ {"??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z", + "class std::complex __cdecl std::operator*(float const &,class std::complex const &)", + "??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z"}, }; int i, num_test = (sizeof(test)/sizeof(test[0])); diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 8ed075722b8..9c24f4a19f4 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -1238,10 +1238,16 @@ static BOOL symbol_demangle(struct parsed_symbol* sym) sym->current++; /* Then function name or operator code */ - if (*sym->current == '?' && sym->current[1] != '$') + if (*sym->current == '?' && (sym->current[1] != '$' || sym->current[2] == '?')) { const char* function_name = NULL; + if (sym->current[1] == '$') + { + do_after = 6; + sym->current += 2; + } + /* C++ operator code (one character, or two if the first is '_') */ switch (*++sym->current) { @@ -1374,6 +1380,17 @@ static BOOL symbol_demangle(struct parsed_symbol* sym) sym->result = (char*)function_name; ret = TRUE; goto done; + case 6: + { + char *args; + struct array array_pmt; + + str_array_init(&array_pmt); + args = get_args(sym, &array_pmt, FALSE, '<', '>'); + if (args != NULL) function_name = str_printf(sym, "%s%s", function_name, args); + sym->names.num = 0; + } + /* fall through */ default: if (!str_array_push(sym, function_name, -1, &sym->stack)) return FALSE;