d-demangle.c (dlang_parse_structlit): Correctly handle error result.
* d-demangle.c (dlang_parse_structlit): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. From-SVN: r270698
This commit is contained in:
parent
80b1ab1579
commit
dba20a5140
|
@ -1,5 +1,8 @@
|
|||
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
||||
|
||||
* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
|
||||
* testsuite/d-demangle-expected: Add testcase.
|
||||
|
||||
|
|
|
@ -1246,6 +1246,9 @@ dlang_parse_structlit (string *decl, const char *mangled, const char *name)
|
|||
while (args--)
|
||||
{
|
||||
mangled = dlang_value (decl, mangled, NULL, '\0');
|
||||
if (mangled == NULL)
|
||||
return NULL;
|
||||
|
||||
if (args != 0)
|
||||
string_append (decl, ", ");
|
||||
}
|
||||
|
|
|
@ -1314,3 +1314,7 @@ _D8__T2fnVa8888888888888_
|
|||
--format=dlang
|
||||
_D5__T2fnVmA1A1A911111111D
|
||||
_D5__T2fnVmA1A1A911111111D
|
||||
# Could crash
|
||||
--format=dlang
|
||||
_D7__T2fnVlS8S588888888888S6S5
|
||||
_D7__T2fnVlS8S588888888888S6S5
|
||||
|
|
Loading…
Reference in New Issue