At the time, California had a blanket primary, meaning all candidates of all parties were on the same ballot, but the state parties, exploiting a loophole in the election law, used color-coded ballots so that only votes from party members would count. Thus, many votes for McCain—nearly 800,000—were discounted. It was thought by pundits that McCain could demonstrate his viability in a large Democratic state if he won the general primary; however, Bush still won a solid majority with all the non-Republican votes factored in.