From eda2e11d3124d64292a11765398e083bdc7b0dae Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Wed, 28 Jan 2026 10:51:18 -0600 Subject: [PATCH] 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. --- src/mainclient/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mainclient/shell.c b/src/mainclient/shell.c index a6fa79ec..497fb33a 100644 --- a/src/mainclient/shell.c +++ b/src/mainclient/shell.c @@ -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;