diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 85ee181fc2c..6b255109e1f 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -378,6 +378,12 @@ static char* get_args(struct parsed_symbol* sym, BOOL z_term, sym->current++; break; } + /* Handle empty list in variadic template */ + if (!z_term && sym->current[0] == '$' && sym->current[1] == '$' && sym->current[2] == 'V') + { + sym->current += 3; + continue; + } if (!demangle_datatype(sym, &ct, IN_ARGS)) return NULL; /* 'void' terminates an argument list in a function */ diff --git a/dlls/ucrtbase/tests/cpp.c b/dlls/ucrtbase/tests/cpp.c index 9a66d66d814..c20f889d686 100644 --- a/dlls/ucrtbase/tests/cpp.c +++ b/dlls/ucrtbase/tests/cpp.c @@ -24,6 +24,8 @@ #include #include +#include +#include #include "wine/test.h" typedef unsigned char MSVCRT_bool; @@ -209,11 +211,15 @@ static void test___unDName(void) /* 5 */ {"?meth@Q@@QEGBA?AV1@XZ", "public: class Q Q::meth(void)const & ", "public: ?? :: ?? ::XZ::V1" /* W10 1507 fails on this :-( */, - 0x02 /*UNDNAME_NO_MS_KEYWORDS*/}, + UNDNAME_NO_MS_KEYWORDS}, /* 6 */ {"?meth@Q@@QEHAA?AV1@XZ", "public: class Q Q::meth(void)&& ", "public: ?? :: ?? ::XZ::V1" /* W10 1507 fails on this :-( */, - 0x02 /*UNDNAME_NO_MS_KEYWORDS*/}, + UNDNAME_NO_MS_KEYWORDS}, +/* 7 */ {"?AU?$my_iter@H$0A@$$V@@", + "struct my_iter", + NULL, + UNDNAME_NO_ARGUMENTS}, }; unsigned i; for (i = 0; i < ARRAY_SIZE(und_tests); i++)