This commit just provides the final protection against
possible screen corruption when processing line input.
[ such corruption was limited to the input line only ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
pos = strlen(buf);
break;
default: // what we REALLY wanted (maybe)
- if (bufNXT < bufMAX && scrNXT < Screen_cols) {
+ if (bufNXT < bufMAX && scrNXT < Screen_cols && strlen(buf) < bufMAX) {
int tot = UTF8_tab[(unsigned char)key],
sav = pos;
if (tot < 1) tot = 1;