When a judgment against the defendant is reversed, and it appears that no offense whatever has been committed, the Criminal Court of Appeals must direct that the defendant be discharged; but if it appears that the defendant is guilty of an offense although defectively charged in the indictment, the Criminal Court of Appeals must direct the prisoner to be returned and delivered over to the jailer of the proper county, there to abide the order of the court in which he was convicted.
Okla. Stat. tit. 22, § 1067