KellyBeeb,
 
It sounds like you handled it correctly.  To a certain extent -- calories and calories -- and if you counted against equivalent calories, then it should not affect your loss.  So, the damage is probably more psychological than physical.  As Kilobel metioned -- it was a meal bar, not junk food.
 
MM