d-demangle.c (dlang_parse_tuple): Correctly handle error result.
* d-demangle.c (dlang_parse_tuple): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. From-SVN: r270699
This commit is contained in:
parent
dba20a5140
commit
f181b8e780
|
@ -1,5 +1,8 @@
|
||||||
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
||||||
|
|
||||||
|
* d-demangle.c (dlang_parse_tuple): Correctly handle error result.
|
||||||
|
* testsuite/d-demangle-expected: Add testcase.
|
||||||
|
|
||||||
* 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.
|
* testsuite/d-demangle-expected: Add testcase.
|
||||||
|
|
||||||
|
|
|
@ -1503,6 +1503,9 @@ dlang_parse_tuple (string *decl, const char *mangled)
|
||||||
while (elements--)
|
while (elements--)
|
||||||
{
|
{
|
||||||
mangled = dlang_type (decl, mangled);
|
mangled = dlang_type (decl, mangled);
|
||||||
|
if (mangled == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (elements != 0)
|
if (elements != 0)
|
||||||
string_append (decl, ", ");
|
string_append (decl, ", ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1318,3 +1318,7 @@ _D5__T2fnVmA1A1A911111111D
|
||||||
--format=dlang
|
--format=dlang
|
||||||
_D7__T2fnVlS8S588888888888S6S5
|
_D7__T2fnVlS8S588888888888S6S5
|
||||||
_D7__T2fnVlS8S588888888888S6S5
|
_D7__T2fnVlS8S588888888888S6S5
|
||||||
|
# Could crash
|
||||||
|
--format=dlang
|
||||||
|
_D1_B699999999961*
|
||||||
|
_D1_B699999999961*
|
||||||
|
|
Loading…
Reference in New Issue