That's fine as long as you buy the extra bit before leaving validity of the ticket you hold.
Arguably it counts as two journeys rather than one in that case though, as the regulations do require you to hold a ticket or tickets for "your entire journey" before boarding.