1
0
mirror of https://github.com/janet-lang/janet synced 2026-02-05 17:50:23 +00:00

MSVC and windows clib does not like fopen(NULL, ...)

We were exploiting this behavior on posix when adding shell history for
the built-in readline functionality.
This commit is contained in:
Calvin Rose
2026-01-28 10:51:18 -06:00
parent ae0afe6198
commit eda2e11d31

View File

@@ -445,6 +445,7 @@ static void loadhistory(void) {
if (gbl_history_loaded) return;
calc_history_file();
gbl_history_loaded = 1;
if (NULL == gbl_history_file) return;
FILE *history_file = fopen(gbl_history_file, "rb");
if (NULL == history_file) return;
JanetParser p;