mruby-bin-mirb: skip adding empty input to mirb history

This commit is contained in:
hasse
2025-05-11 02:44:04 +09:00
parent 3d2f848e64
commit 6df8096af2
+3 -1
View File
@@ -607,7 +607,9 @@ main(int argc, char **argv)
}
strcpy(last_code_line, line);
strcat(last_code_line, "\n");
MIRB_ADD_HISTORY(line);
if (strlen(line) > 0) {
MIRB_ADD_HISTORY(line);
}
MIRB_LINE_FREE(line);
#endif