aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/term/terminal.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-06-08 11:55:13 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-06-10 09:42:19 +0200
commit46c8da7d9acd6011f318ce8fa9c38591888654f0 (patch)
tree54e097a523e9d67eb97b65e963a7c46bf2f7973d /vendor/golang.org/x/term/terminal.go
parent9f1bd0a0a1494f46a49ca7f22511c5a78006afd8 (diff)
downloadpodman-46c8da7d9acd6011f318ce8fa9c38591888654f0.tar.gz
podman-46c8da7d9acd6011f318ce8fa9c38591888654f0.tar.bz2
podman-46c8da7d9acd6011f318ce8fa9c38591888654f0.zip
vendor buildah@main
Note that the bud-logfile-with-split-logfile-by-platform test is skipped on the remote client (see #14544). Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/term/terminal.go')
-rw-r--r--vendor/golang.org/x/term/terminal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go
index 535ab8257..4b48a5899 100644
--- a/vendor/golang.org/x/term/terminal.go
+++ b/vendor/golang.org/x/term/terminal.go
@@ -935,7 +935,7 @@ func (s *stRingBuffer) Add(a string) {
// next most recent, and so on. If such an element doesn't exist then ok is
// false.
func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
- if n >= s.size {
+ if n < 0 || n >= s.size {
return "", false
}
index := s.head - n