diff --git a/lib/comm_plan/all.go b/lib/comm_plan/all.go index 3121bdf..fa21ed0 100644 --- a/lib/comm_plan/all.go +++ b/lib/comm_plan/all.go @@ -725,7 +725,7 @@ func getCommissionRatio(typ string, level, peerNum int, grade map[int]*LvGrade) case "team": ratio = grade[level].TeamRate case "same_lv": - if len(grade[level].PeerRate) == 0 { + if len(grade[level].PeerRate) == 0 || len(grade[level].PeerRate) >= peerNum+1 { ratio = 0 } else { ratio = grade[level].PeerRate[peerNum]