diff --git a/libbb/read_key.c b/libbb/read_key.c index 0faa12c97..8422976c9 100644 --- a/libbb/read_key.c +++ b/libbb/read_key.c @@ -264,5 +264,5 @@ void FAST_FUNC read_key_ungets(char *buffer, const char *str, unsigned len) if (len > KEYCODE_BUFFER_SIZE-1 - cur_len) len = KEYCODE_BUFFER_SIZE-1 - cur_len; memcpy(buffer + 1 + cur_len, str, len); - buffer[0] += cur_len + len; + buffer[0] += len; }