Combine sugar, water, cornstarch, butter or margarine, mashed peaches, and nutmeg in a saucepan. Cook over medium heat until clear and thick. Stir in vanilla.