Chapter 33.
64 Donatulus of Capse said: "I also have always entertained this opinion, that heretics, who have gained nothing outside the Church, should be baptized when they are converted to the Church."
65. To this the answer is: They have, indeed, gained nothing outside the Church, but that is nothing towards salvation, not nothing towards the sacrament. For salvation is peculiar to the good; but the sacraments are common to the good and bad alike.
Source: On Baptism, Against the Donatists (New Advent)