Skip to content

Commit c00b3e4

Browse files
committed
fixed length check
Signed-off-by: Dave Shanley <dave@quobix.com>
1 parent 1a717e8 commit c00b3e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parameters/path_parameters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (v *paramValidator) ValidatePathParams(request *http.Request) (bool, []*err
7878
paramValue := ""
7979

8080
// extract the parameter value from the path.
81-
if len(submittedSegments) < x {
81+
if x < len(submittedSegments) {
8282
paramValue = submittedSegments[x]
8383
}
8484

0 commit comments

Comments
 (0)