Moved string termination out of main loop

This commit is contained in:
James Booth
2015-01-15 01:27:24 +00:00
parent aec1484806
commit 40f91de7a3
2 changed files with 4 additions and 1 deletions

View File

@@ -193,6 +193,10 @@ ui_get_char(char *input, int *size)
ui_input_nonblocking(FALSE);
}
if (ch == '\n') {
input[*size++] = '\0';
}
return (ch != '\n');
}