The provisions of § 22-4-1 do not protect a person who, in attempting unsuccessfully to commit a crime, commits another and different crime, whether greater or less in guilt, from suffering the punishment prescribed by law for the crime committed.
SDCL 22-4-2