Fix bug with running code

This commit is contained in:
Tom Willemse 2022-08-12 22:41:06 -07:00
parent a819a85209
commit dbca60fd23

View file

@ -399,7 +399,7 @@ static InterpretResult run() {
InterpretResult interpret(const char *source) { InterpretResult interpret(const char *source) {
ObjFunction *function = compile(source); ObjFunction *function = compile(source);
if (function != NULL) if (function == NULL)
return INTERPRET_COMPILE_ERROR; return INTERPRET_COMPILE_ERROR;
push(OBJ_VAL(function)); push(OBJ_VAL(function));