More code error fixes

This commit is contained in:
Florian Grousset
2022-12-30 19:59:01 -06:00
parent ce3cc4d305
commit e76ce1b40b
2 changed files with 4 additions and 3 deletions

View File

@@ -278,10 +278,11 @@ void next_token(state* s) {
s->type = TOK_NUMBER;
} else {
/* Look for a variable or builtin function call. */
if(isalpha(s->next[0])) {
if(isalpha((int)s->next[0])) {
const char* start;
start = s->next;
while(isalpha(s->next[0]) || isdigit(s->next[0]) || (s->next[0] == '_')) s->next++;
while(isalpha((int)s->next[0]) || isdigit((int)s->next[0]) || (s->next[0] == '_'))
s->next++;
const te_variable* var = find_lookup(s, start, s->next - start);
if(!var) var = find_builtin(start, s->next - start);