1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 10:46:45 +02:00

small bug fix and formatting

This commit is contained in:
Jfreegman
2013-10-25 00:29:40 -04:00
parent b9b3487581
commit 3f7e60eaf4
3 changed files with 7 additions and 8 deletions

View File

@ -136,7 +136,7 @@ static void prompt_onKey(ToxWindow *self, Tox *m, wint_t key)
/* Add printable characters to line */
else if (isprint(key)) {
if (prompt_buf_pos < (MAX_STR_SIZE-1)) {
if (prompt_buf_pos <= MAX_STR_SIZE) {
mvwaddch(self->window, y, x, key);
prompt_buf[prompt_buf_pos++] = key;
prompt_buf[prompt_buf_pos] = '\0';