Section 183 of Criminal Procedure Code CAP 75: Charge of administering oaths
Where a person is charged with an offence under paragraph (a) of section 61 of the Penal Code (Cap. 63), and the court is of the opinion that he is not guilty of that offence but is guilty of another offence under the same paragraph, he may be convicted of that other offence although he was not charged with it.
Check the current authoritative text and amendment history before relying on this provision.