Commit 618f25bf authored by Joseph McCullough's avatar Joseph McCullough

'exit' and 'quit' cause exit regardless of open block

parent bd3d5268
......@@ -181,19 +181,9 @@ main(void)
last_code_line[char_index] = '\0';
if ((strcmp(last_code_line, "quit") == 0) ||
(strcmp(last_code_line, "exit") == 0)) {
if (code_block_open) {
/* cancel the current block and reset */
code_block_open = FALSE;
memset(ruby_code, 0, sizeof(*ruby_code));
memset(last_code_line, 0, sizeof(*last_code_line));
continue;
}
else {
/* quit the program */
break;
}
if ((strcmp(last_code_line, "quit") == 0) || (strcmp(last_code_line, "exit") == 0)) {
/*:quit the program */
break;
}
else {
if (code_block_open) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment