Parse empty files correctly

This commit is contained in:
Ilmir Usmanov
2014-08-01 15:49:35 +04:00
parent 0ee1b9b54e
commit 59403ac7f2
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -56,7 +56,8 @@ static const char *token_start;
static char
get_char (size_t i)
{
JERRY_ASSERT ((buffer + i) < (buffer_start + buffer_size));
if ((buffer + i) >= (buffer_start + buffer_size))
return '\0';
return *(buffer + i);
}