another bug fix

This commit is contained in:
cozis
2022-01-22 02:09:18 +01:00
parent 3df0cc0a7d
commit c77a28896e
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -231,8 +231,6 @@ static Object *walkValue(const char *fmt, int *i, va_list va, Heap *heap, Error
const char *src = fmt + start;
int len = end - start;
printf("src: [%.*s]\n", len, src);
o = eval(src, len, NULL, heap, error);
if(o == NULL)
+1 -1
View File
@@ -151,7 +151,7 @@ static Token *tokenize(Source *src, BPAlloc *alloc, Error *error)
while(i < len && isspace(str[i]))
i += 1;
if(str[i] == '#')
if(i < len && str[i] == '#')
{
i += 1;