Section 84 IPC Act of a person of unsound mind
 

Section 84 of Indian Penal Code 1860 : Act of a person of unsound mind

Nothing is an offence which is done by a person who, at the time of doing it, by reason of unsoundness of mind, is incapable of knowing the nature of the act, or that he is doing what is either wrong or contrary to law.