mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-29 22:44:20 +00:00
Fix off by 1 error in first match scale test (#1057)
This commit is contained in:
@ -46,7 +46,7 @@ func firstMatchMmf(p *pb.MatchProfile, poolTickets map[string][]*pb.Ticket) ([]*
|
|||||||
tickets := poolTickets[poolName]
|
tickets := poolTickets[poolName]
|
||||||
var matches []*pb.Match
|
var matches []*pb.Match
|
||||||
|
|
||||||
for i := 0; i+1 <= len(tickets); i += 2 {
|
for i := 0; i+1 < len(tickets); i += 2 {
|
||||||
matches = append(matches, &pb.Match{
|
matches = append(matches, &pb.Match{
|
||||||
MatchId: fmt.Sprintf("profile-%v-time-%v-%v", p.GetName(), time.Now().Format("2006-01-02T15:04:05.00"), len(matches)),
|
MatchId: fmt.Sprintf("profile-%v-time-%v-%v", p.GetName(), time.Now().Format("2006-01-02T15:04:05.00"), len(matches)),
|
||||||
Tickets: []*pb.Ticket{tickets[i], tickets[i+1]},
|
Tickets: []*pb.Ticket{tickets[i], tickets[i+1]},
|
||||||
|
Reference in New Issue
Block a user