Commit b04183fd authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #848 from carsonmcdonald/mirbreadlinefix

Fix mirb crash 
parents 79440614 fb5e83a6
...@@ -191,6 +191,10 @@ main(void) ...@@ -191,6 +191,10 @@ main(void)
last_code_line[char_index] = '\0'; last_code_line[char_index] = '\0';
#else #else
char* line = readline(code_block_open ? "* " : "> "); char* line = readline(code_block_open ? "* " : "> ");
if(line == NULL) {
printf("\n");
break;
}
strncat(last_code_line, line, sizeof(last_code_line)-1); strncat(last_code_line, line, sizeof(last_code_line)-1);
add_history(line); add_history(line);
free(line); free(line);
......
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