
Federer was unusually nervous and needed three sets to see off Krajinovic in his hometown of Basel – 6-2, 4-6, 6-4.
The world No 3 – who has won the tournament eight times – is on a 15-match unbeaten streak and is hoping to land his 99th ATP Tour title.
Although his form has been indifferent at times in 2018, Federer was very self-critical after reaching the last-16 of the Swiss Indoors.
In particular, he was disappointed with his serve, and at one stage of the match, he only got 47 per cent of his first serves in.
“I didn’t serve very well today,” Federer said.

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.
The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.
“I think I was misfiring the corners, I was not hitting the lines enough.
“Clearly you make your life more difficult, but still I was up 6-2, 3-1, break points, so things could have ended very quickly today, even though I didn’t have the best serve percentage stats.
“But maybe that’s exactly what caught up to me eventually.
“It’s just getting used to it. This is where the first rounds can be tricky.”
Federer will meet German Jan-Lennard Struff in the last-16 tomorrow.
And Struff is not expecting to have things all his own way.
He added: “Playing Federer here is tough.
“I will watch the match with my team and we will try and see what we can do.
“It won’t be easy for sure.”