Fix unreachable code in REPL.

This commit is contained in:
Bob Nystrom
2015-03-22 10:27:38 -07:00
parent 1e493c9061
commit f732ada5ea
2 changed files with 9 additions and 9 deletions
+7 -9
View File
@@ -20,18 +20,16 @@ static int runRepl()
{
printf("> ");
if (fgets(line, MAX_LINE_LENGTH, stdin))
{
// TODO: Handle failure.
wrenInterpret(vm, "Prompt", line);
// TODO: Automatically print the result of expressions.
}
else
if (!fgets(line, MAX_LINE_LENGTH, stdin))
{
printf("\n");
return 0;
break;
}
// TODO: Handle failure.
wrenInterpret(vm, "Prompt", line);
// TODO: Automatically print the result of expressions.
}
wrenFreeVM(vm);