IB 725 then BA 870 at Heathrow
Madrid → London → Budapest
Timetable, London time
18:50IB 725 from Madrid at the gate
18:25BA 870 to Budapest leaves the gate
23 h 35 apart on the timetable, overnight
BA 870 leaves 23 h 35 after IB 725 arrives on the timetable: more than half a day, so not a connection we count.