When an indictment is found, the names of the witnesses examined before the grand jury must be endorsed thereon before the same is presented to the court, but a failure to so endorse the said names shall not be sufficient reason for setting aside the indictment if the district attorney or prosecuting officer will within a reasonable time, to be fixed by the court, endorse the names of the witnesses for the prosecution on the indictment. Provided that the names of witnesses examined before the grand jury on matters not concerning the indictment in question shall not be endorsed on the indictment relative to such case. The court or judge may, at any time, direct the names of additional witnesses for the prosecution to be endorsed on the indictment, and shall order that such names be furnished to the defendant or his counsel.
Okla. Stat. tit. 22, § 384