Fix bug with running code
This commit is contained in:
parent
a819a85209
commit
dbca60fd23
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ static InterpretResult run() {
|
|||
|
||||
InterpretResult interpret(const char *source) {
|
||||
ObjFunction *function = compile(source);
|
||||
if (function != NULL)
|
||||
if (function == NULL)
|
||||
return INTERPRET_COMPILE_ERROR;
|
||||
|
||||
push(OBJ_VAL(function));
|
||||
|
|
Loading…
Reference in a new issue