Update prompt.c

This commit is contained in:
Nominate 2013-08-06 11:20:11 +01:00
parent 45c84e55e6
commit fb9791bc69

View File

@ -276,7 +276,7 @@ static void execute(ToxWindow* self, char* u_cmd) {
static void prompt_onKey(ToxWindow* self, int key) {
// PRINTABLE characters: Add to line.
if(isprint(key)) {
if (prompt_buf_pos == 255){
if (prompt_buf_pos == (sizeof(prompt_buf) - 1)){
wprintw(self->window, "\nToo Long.\n");
prompt_buf_pos = 0;
prompt_buf[0] = 0;