summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/search.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/image/search.go b/libpod/image/search.go
index e557431c6..82ef4f75a 100644
--- a/libpod/image/search.go
+++ b/libpod/image/search.go
@@ -162,8 +162,11 @@ func searchImageInRegistry(term string, registry string, options SearchOptions)
if len(results) < limit {
limit = len(results)
}
- if options.Limit != 0 && options.Limit < len(results) {
- limit = options.Limit
+ if options.Limit != 0 {
+ limit = len(results)
+ if options.Limit < len(results) {
+ limit = options.Limit
+ }
}
paramsArr := []SearchResult{}