[GB.EVAL]

* BUG: Fix analyze of non-terminated strings and quoted symbols that could 
  crash.


git-svn-id: svn://localhost/gambas/trunk@4584 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-04-01 01:24:22 +00:00
parent cb17bebf98
commit f625b0e9c9
2 changed files with 2 additions and 2 deletions

View file

@ -529,7 +529,7 @@ PUBLIC void EVAL_analyze(const char *src, int len, int state, EVAL_ANALYZE *resu
EVAL_clear(EVAL, FALSE);
EVAL->source = GB.NewString(src, len);
EVAL->source = GB.AddString(EVAL->source, "\0\0", 2);
EVAL->source = GB.AddString(EVAL->source, "\n\0\0", 3);
EVAL->len = len;
EVAL->analyze = TRUE;

View file

@ -820,7 +820,7 @@ static void add_quoted_identifier(void)
{
source_ptr++;
car = get_char();
if (car == '\n')
if (!car || car == '\n')
break;
len++;
if (car == '}')