diff --git a/src/main.c b/src/main.c index 43c7d29c..b994a68f 100644 --- a/src/main.c +++ b/src/main.c @@ -488,7 +488,7 @@ static NOINLINE i64 readInt(char** p) { void before_exit(void) { if (global_replxx!=NULL && global_histfile!=NULL) { - replxx_history_save(global_replxx, global_histfile); + if (!replxx_read_only) replxx_history_save(global_replxx, global_histfile); replxx_end(global_replxx); global_replxx = NULL; }