/* Take the first client principal we find; they should all be the
* same anyway. */
for (i = 0; i < pResponse->CountOfTickets; i++) {
- if (UnicodeStringToMITPrinc(&pResponse->Tickets[0].ClientName,
- &pResponse->Tickets[0].ClientRealm,
+ if (UnicodeStringToMITPrinc(&pResponse->Tickets[i].ClientName,
+ &pResponse->Tickets[i].ClientRealm,
context, &data->princ))
break;
/* Take the first client principal we find; they should all be the
* same anyway. */
for (i = 0; i < pResponse->CountOfTickets; i++) {
- if (UnicodeStringToMITPrinc(&pResponse->Tickets[0].ClientName,
- &pResponse->Tickets[0].ClientRealm,
+ if (UnicodeStringToMITPrinc(&pResponse->Tickets[i].ClientName,
+ &pResponse->Tickets[i].ClientRealm,
context, &data->princ))
break;
}