Am I protected on the sugar pill if my period is a week early?

Patient: I’ve been on the pill for 6 months and have been taking it regularly at the same time each day. I missed two periods on the pill and so went to a sexual health clinic where the nurse reassured me that I wasn’t pregnant as I had been taking the pill accurately and told me it was probably due to stress as I had recently moved country. Following this I got my period a week before my sugar pills were to start. My period lasted 5 days. I took the active pills during this time and then went onto the sugar pills the next week as per the packet. I had sex with my partner whilst taking the sugar pills and am wanting to know if I was protected since I had got my period the week prior to the sugar pills?

Doctor: