delivered the opinion of the court.
This case is before the court on a writ of habeas corpus issued by this court on September 5, 1944, pursuant to its original jurisdiction, to test the validity of an order of the Circuit Court of Lancaster county entered on December 10, 1936, sentencing the petitioner to a term of life imprisonment, by virtue of which he is held in custody in the Virginia State penitentiary.
At the November, 1936, term of the Circuit Court of Lancaster county the grand jury returned as true bills two indictments against the petitioner. He was charged jointly in one indictment, with Francis U. Wright, with robbery through the use of firearms, and in the other indictment he was charged jointly with Wright with an attempted murder.
The following is disclosed by the record:
“Commonwealth of Virginia vs. Granville Lee Harmon & Francis U. Wright.
“(Indictment for a felony—A True Bill, G. W. Sanders, Foreman).”
*416“Commonwealth of Virginia vs. Granville Lee Harmon & Francis U. Wright.
“(Indictment for a felony—A True Bill, G. W. Sanders, Foreman).”
On December 10, 1936, the order of the court discloses:
. * The prisoners were led to the bar * * and being arraigned, tendered in person, in open court, a plea of guilty to the indictment. * * Therefore, it is considered by the court that said Granville Lee Harmon and Francis U. Wright, prisoners aforesaid, be confined in the penitentiary for their respective lives # * .”
The last order was entered at the January, 1937, term of the court, in which a nolle prosequi was entered as to one of the indictments. The record discloses this memorandum:
“Com. of Virginia vs. (Felony—Nolle Pros.) Granville Lee Harmon & Francis U. Wright.”
The contention of the petitioner is that there were two indictments charging separate and distinct offenses against him; that the penalties for each were different; the maximum penalty for the robbery indictment being death, and the maximum penalty for the attempted murder indictment being ten years in the penitentiary; that the record fads to disclose upon which of the indictments the petitioner was sentenced and upon which was entered the nolleoprosequi.
The Attorney General in his brief has made this clear statement of the case, in which we concur:
“Two indictments were returned in the present case:
“(1) Robbery through the use of firearms; and (2) Attempted Murder.
“The offense of robbery through the use of firearms was punishable in 1936 and still is by ‘death, or by confinement in the penitentiary for life, or for any term not less than eight years.’ (Section 4405 of the Code of Virginia.)
*417“The offense of attempted murder was punishable in 1936, and still is, as follows: ‘If the offense attempted be punishable with death, the person making such attempt shall be confined in the penitentiary not less than one nor more than ten years; * * * .’ (Section 4767 of the Code of Virginia.)
“In the final order in the present case (Exhibit F), the punishment was fixed at fife imprisonment. This punishment is responsive to the indictment for robbery and is not responsive to the indictment for attempted murder, therefore it is submitted that the order, when read in connection with the entire record, is not void and that the court had jurisdiction to enter it.
“In 39 C. J. S., p. 485, title ‘Habeas Corpus’, sec. 26 (2), it is stated:
“ ‘Where sentence is imposed on conviction under several indictments or counts, habeas corpus will not lie if the sentence is authorized under any indictment or any count or counts, * * * .’
“As has been submitted before, the order is not void on its face simply because it fails to designate the offense. Under the circumstances, viz., that two indictments were pending, it would have been better practice for the order to have designated the offense, e. g., robbery, but a mere omission to do so will not render the judgment void. Mere irregularities or omissions in the judgment will not render it void.
“ t# # # The writ does not lie where the judgment is merely voidable by reason of errors of law or of fact, omissions, or other irregularities, no matter how numerous or flagrant they may be, at least where the law provides a remedy by appeal or writ of error to obtain their correction. The sole question involved is that of jurisdiction—that is, the question as to whether the court had jurisdiction of the person of the petitioner and of the subject matter and, according to the prevailing view, power to render the particular judgment." A judgment rendered by a court without jurisdiction in either of these particulars may be assailed by a writ of habeas corpus, and the prisoner may be either discharged or remanded to custody for a proper sentence. Conversely, *418it seems well settled that where the court has jurisdiction of the person and the subject matter of a prosecution, and the punishment is of the character prescribed by law, habeas corpus will not lie for the release of a prisoner because of mere errors, irregularities, and defects in the sentence. * * *’ (25 Am. Jur. pp. 185-186, Habeas Corpus, sec. 55.)”.
The judgment in the case at bar recites that the accused entered a plea of guilty to the indictment. There were only two indictments to which this plea could have referred. As we have seen, the punishment actually imposed was life imprisonment. This punishment could not have been meted out upon the indictment for attempted murder. The punishment inflicted was responsive only to the indictment for robbery.
No objection was made to the sentence and no writ of error was prosecuted. • Eight years have elapsed since the sentence was imposed, and it would seem, in the absence of a showing to the contrary, that a conclusive presumption may be indulged against the petitioner to the effect that he knew that he was tried and punished on the robbery indictment and is now in custody for that offense. It is too late to assert that the judgment is invalid and void. The court had jurisdiction of the person and of the offense at the time the judgment was entered. An inspection of the entire record will force one to conclude that the accused plead guilty to the indictment for robbery, and that it was the intent of the court to sentence him upon that indictment, and not to sentence him upon the indictment for attempted murder. The burden was upon the petitioner to show that the court lacked jurisdiction to enter the order. This burden he has failed to carry. Before an order of this nature may be taken advantage of by habeas corpus proceéding it must be void upon its face. To be voidable alone is not sufficient. If it were only voidable it' could have been corrected upon a writ of error. Habeas corpus is not to be substituted for a writ of error. Hanson v. Smyth, ante, p. 384, 32 S. E. (2d) 142.
No prejudice or injustice has been done the petitioner. The death penalty might have been inflicted for his offense. *419He will not be permitted “to acquiesce in the error of the court, if it were error,” for eight years and then free himself from the balance of his sentence on an irregularity. Hudson v. Youell, 179 Va. 442, 19 S. E. (2d) 705.
The discharge from custody is denied and the petitioner remanded.
Discharge denied.