ucrtbase: Handle empty list in variadic template.

This commit is contained in:
Piotr Caban 2024-05-14 18:43:05 +02:00 committed by Alexandre Julliard
parent ab9201be5c
commit 841f33afbb
2 changed files with 14 additions and 2 deletions

View file

@ -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 */

View file

@ -24,6 +24,8 @@
#include <windef.h>
#include <winbase.h>
#include <verrsrc.h>
#include <dbghelp.h>
#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<int,0>",
NULL,
UNDNAME_NO_ARGUMENTS},
};
unsigned i;
for (i = 0; i < ARRAY_SIZE(und_tests); i++)