In a small pot off the heat, whisk together the sugar and cornstarch. Add the egg yolks and ¼ cup (60 ml) of the milk. Mix well. Add the remaining milk, the vanilla and butter. Bring to a boil over medium heat, stirring constantly and scraping the bottom and sides of the pot, just until the mixture thickens. Remove from the heat.