Malaysia legislation
Section 167
Section 167
If in the case mentioned in section 166 the accused is charged with one offence and it appears in evidence that he committed a different offence for which he might have been charged under the provisions of that section, he may be convicted of the offence which he is shown to have committed although he was not charged with it.
A is charged with theft. It appears that he committed the offence of criminal breach of trust, or that of receiving stolen goods. He may be convicted of criminal breach of trust, or of receiving stolen goods (as the case may be) though he was not charged with such offence.