(1) No person shall be punished as for a crime if at the time of his trial the act or omission with which he is charged no longer constitutes a crime.(2) If the law in force when a crime was committed differs from that in force at the time of the conviction therefor, the offender shall not be punished to any greater extent than was authorized by the former law, or than is authorized by the latter law.