msvcrt: Fix _unDName crash when demangling class function pointer.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2021-04-30 20:50:59 +02:00 committed by Alexandre Julliard
parent d91160835a
commit 7a1e7cbeee
2 changed files with 3 additions and 1 deletions

View File

@ -1091,6 +1091,8 @@ static void test_demangle_datatype(void)
"class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,32256>",TRUE},
{ "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@",
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@", FALSE},
{ "P8test@@AACXZ", "signed char (__cdecl test::*)(void)", TRUE},
{ "P8test@@BACXZ", "signed char (__cdecl test::*)(void)const ", TRUE},
};
int i, num_test = ARRAY_SIZE(demangle);

View File

@ -879,7 +879,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
goto done;
if (modifier)
modifier = str_printf(sym, "%s %s", modifier, ptr_modif);
else if(ptr_modif[0])
else if(ptr_modif)
modifier = str_printf(sym, " %s", ptr_modif);
if (!get_calling_convention(*sym->current++,
&call_conv, &exported,