UX 1042 then IB 7642 at Madrid
Rome → Madrid → Casablanca
Timetable, Madrid time
20:35UX 1042 from Rome at the gate
19:05IB 7642 to Casablanca leaves the gate
22 h 30 apart on the timetable, overnight
IB 7642 leaves 22 h 30 after UX 1042 arrives on the timetable: more than half a day, so not a connection we count.