diff options
author | Kerfuffle <44031344+KerfuffleV2@users.noreply.github.com> | 2023-06-11 08:19:17 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-11 08:19:17 -0600 |
commit | fa84c4b3e80199a5683438f062009c031a06c4fa (patch) | |
tree | c0c088e617ec6137a1ea47dc0167fc164c05e2bb /examples/common.cpp | |
parent | 12b063f0ecf280e98028e444fc492ee6222cdcdc (diff) |
Fix issue where interactive mode crashes when input exceeds ctx size (#1789)
* Fix issue where interactive mode in the main example crashes when input exceeds ctx size
* Ensure the context size is at least 8 tokens in the main example.
Closes #1768
Diffstat (limited to 'examples/common.cpp')
-rw-r--r-- | examples/common.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/common.cpp b/examples/common.cpp index f5d886a..df69f27 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -632,6 +632,9 @@ void console_set_color(console_state & con_st, console_color_t color) { case CONSOLE_COLOR_USER_INPUT: fprintf(con_st.out, ANSI_BOLD ANSI_COLOR_GREEN); break; + case CONSOLE_COLOR_ERROR: + fprintf(con_st.out, ANSI_BOLD ANSI_COLOR_RED); + break; } con_st.color = color; fflush(con_st.out); |