+2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * d-demangle.c (dlang_call_convention): Return NULL if have reached the
+ end of the symbol, but expected something to read.
+ (dlang_attributes): Likewise.
+ (dlang_function_type): Likewise.
+ (dlang_type): Likewise.
+ (dlang_identifier): Likewise.
+ (dlang_value): Likewise.
+
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_parse_string): Represent embedded whitespace or
dlang_call_convention (string *decl, const char *mangled)
{
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
switch (*mangled)
{
dlang_attributes (string *decl, const char *mangled)
{
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
while (*mangled == 'N')
{
size_t szattr, szargs, sztype;
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
/* The order of the mangled string is:
CallConvention FuncAttrs Arguments ArgClose Type
dlang_type (string *decl, const char *mangled)
{
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
switch (*mangled)
{
dlang_identifier (string *decl, const char *mangled)
{
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
if (ISDIGIT (*mangled))
{
dlang_value (string *decl, const char *mangled, const char *name, char type)
{
if (mangled == NULL || *mangled == '\0')
- return mangled;
+ return NULL;
switch (*mangled)
{