]> skyeroc.xyz Git - dgamelaunch/commitdiff
Actually make ee give feedback when exiting due to strange characters
authorPasi Kallinen <paxed@alt.org>
Thu, 22 May 2014 19:12:14 +0000 (22:12 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 22 May 2014 19:12:14 +0000 (22:12 +0300)
ee.c

diff --git a/ee.c b/ee.c
index 67acefbdfcfe5ea0bf1e88ccc43d215f969a5c98..631270651be4a666474b11d46c2c9bbf7c8f42f7 100644 (file)
--- a/ee.c
+++ b/ee.c
@@ -1970,8 +1970,16 @@ int *append;     /* TRUE if must append more text to end of current line */
        wchar_t in_string[MAX_FILE];
        length = mbstowcs(in_string, in_str, sizeof(in_string));
 
-       if (length == -1)
+       if (length == -1) {
+           wmove(com_win, 0, 0);
+           wprintw(com_win, "ERROR: Encountered a strange character. --more--");
+           wclrtoeol(com_win);
+           wrefresh(com_win);
+           (void) wget_wch(com_win, &in);
+           resetty();
+           endwin();
            exit(0);
+       }
 
        str2 = in_string;
        num = 0;