[COMPILER]

* BUG: Don't crash when a constant is the void string.


git-svn-id: svn://localhost/gambas/trunk@7144 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-06-19 08:19:54 +00:00
parent 46e7b95477
commit e5db05b186

View File

@ -53,9 +53,19 @@ static const char *get_name(int index)
static void get_string(int index, const char **str, int *len)
{
SYMBOL *sym = TABLE_get_symbol(JOB->class->string, index);
*str = sym->name;
*len = sym->len;
SYMBOL *sym;
if (index == VOID_STRING)
{
*str = "";
*len = 0;
}
else
{
sym = TABLE_get_symbol(JOB->class->string, index);
*str = sym->name;
*len = sym->len;
}
}
static void print_quoted(FILE *file, const char *str, int len)