Skip to content

Commit 5434d11

Browse files
committed
feat(CVSS v4.0): drop the use of max from the Go 1.21 SDK for retrocompatibility
1 parent 647ea94 commit 5434d11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

40/cvss40.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,11 @@ func (cvss40 *CVSS40) Score() float64 {
967967
lower++
968968
} else if eq3 == 0 && eq6 == 0 {
969969
// 00 -> 01 OR 00 -> 10, takes the bigger
970-
eq3eq6nlm = max(lookupMV(eq1, eq2, eq3+1, eq4, eq5, eq6), lookupMV(eq1, eq2, eq3, eq4, eq5, eq6+1))
970+
eq3eq6nlm = lookupMV(eq1, eq2, eq3+1, eq4, eq5, eq6)
971+
eq6nlm := lookupMV(eq1, eq2, eq3, eq4, eq5, eq6+1)
972+
if eq6nlm > eq3eq6nlm {
973+
eq3eq6nlm = eq6nlm
974+
}
971975
lower++
972976
}
973977

0 commit comments

Comments
 (0)