Recollection and meditation is in order. When in doubt, skip Communion or seek Confession ASAP. Discuss your concerns with your Confessor and he will tell you if you did commit mortal sin or not. Even if its venial, its worth confessing.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.