No, I don’t mind when students correct me. It brings up the fact that teachers are human too and that everyone makes mistakes. I usually joke around and say, “I just did that to see who was paying attention,” but it doesn’t bother me. And it is true that everyone makes mistakes, so it shouldn’t be a big deal.
If this happens to you and the teacher doesn’t seem to approve, you could privately discuss with the teacher after class that you just wanted to clarify your own understanding and appreciate the teacher’s clarification.

