diff --git a/c/tem/ctl.c b/c/tem/ctl.c index 9afc1cf..5080c25 100644 --- a/c/tem/ctl.c +++ b/c/tem/ctl.c @@ -272,6 +272,8 @@ Ctl *init_tem(log_manager *logmanager) tem->infifo = infifo; tem->index = 0; tem->logmanager = logmanager; + char *his_buf[HISTORY_BUF] = {NULL}; + memcpy(tem->history,his_buf,HISTORY_BUF); for(int i =0;i<6;i++) { tem->history[i] = NULL; diff --git a/c/tem/ctl.h b/c/tem/ctl.h index 12547bf..97d0083 100644 --- a/c/tem/ctl.h +++ b/c/tem/ctl.h @@ -6,7 +6,7 @@ #include "interpreter/interpreter.h" #define MAX_BUF 256 -#define HISTORY_BUF 256 +#define HISTORY_BUF 210 #define PROMPT "chatbot$$ "