1
0
forked from Mirror/wren

Don't try to run an empty line in the REPL.

This commit is contained in:
Gavin Schulz
2015-01-03 14:25:10 -05:00
parent 6b510da872
commit e3e358fb61

View File

@ -90,8 +90,12 @@ static int runRepl(WrenVM* vm)
return 0;
}
// TODO: Handle failure.
wrenInterpret(vm, "Prompt", line);
// Do nothing if we received an empty line.
if (strcmp(line, "\n") != 0)
{
// TODO: Handle failure.
wrenInterpret(vm, "Prompt", line);
}
free(line);