Sadio Mane scored the winner before missing another penalty as Senegal beat Uganda in Cairo to reach the Africa Cup of Nations quarter-finals.
The Liverpool forward produced a clinical low finish then won a penalty after being fouled by keeper Denis Onyango, who had already been booked.
Mane, who had missed from the spot in the previous game against Kenya, was denied after the referee opted against sending the keeper off.
Allan Kateregga came close to getting an equaliser for Uganda.
Senegal, who are seeking a first Africa Cup of Nations triumph, will meet Benin, surprise winners over Morocco, in the last eight in Cairo on 10 July.
Despite his penalty miss, Mane is leading scorer at the tournament after scoring his third goal, two of which have come from the spot.
Uganda’s build-up to the tie was disrupted by a pay dispute which saw players boycott training on Tuesday.
Emmanuel Okwi and substitute Kateregga, from a late free-kick, both forced saves from Alfred Gomis but Senegal’s experience saw them through.