delivered the opinion of the court:
June 17, 1939, the defendant, Herrold M. Corrie, was indicted in the circuit court of LaSalle county for the crime of rape charged to have been perpetrated on July 31, 1937. Defendant pleaded guilty, and was sentenced to imprisonment in the penitentiary for an indeterminate term of from one year to life. Corrie prosecutes this writ of error.
No bill of exceptions has been filed, and the assignments of error must be considered solely upon the common-law record. Defendant contends, first, that he was erroneously sentenced to an indeterminate period instead of a definite term of imprisonment. So far as relevant, section 1 of the Sentence and Parole Act, as it obtained when sentence was imposed upon defendant, (Ill. Rev. Stat. 1937, chap. 38, par. 801,) provided that in all cases where a person is charged with rape, if the case is tried by the court, without the intervention of a jury, or on a plea of guilty, the court shall fix a definite term of imprisonment and, also, the place of confinement. Here, the court did fix the place of confinement but sentenced defendant to an indeterminate instead of a fixed term of imprisonment. The prosecution has confessed error as to the character of the sentence imposed and asks that the cause be remanded with directions to sentence defendant in conformity with the *589applicable statute and suggests that, upon the remandment, either he or the People be allowed to move the court for leave to offer evidence in mitigation or aggravation of the offense charged. The judgment is erroneous but not void, as the sentence imposed is not different in character from the sentence fixed by the statute. Accordingly, the error in sentencing defendant to a definite term of imprisonment may be corrected upon a writ of error. (People ex rel. Wakefield v. Montgomery, 365 Ill. 478; People ex rel. Swanson v. Kelly, 352 Ill. 567.) The mandatory language of the statute with respect to the period of imprisonment, together with the commendable concession made by the People, renders unnecessary further discussion of defendant’s first contention.
Claiming an infringement of his constitutional rights, defendant insists that the court erred in receiving and entering his plea of guilty without first advising him of his right to legal counsel and in failing to appoint counsel for him. Section 9 of article II of our constitution ordains that “In all criminal prosecutions the accused shall have the right to appear and defend in person and by counsel.” There is, however, no mandatory constitutional requirement that counsel be assigned to an accused. Section 2 of division XIII of the Criminal Code provides, “Every person charged with crime shall be allowed counsel, and when he shall state upon oath that he is unable to procure counsel, the court shall assign him competent counsel, who shall conduct his defense.” (Ill. Rev. Stat. 1943, chap. 38, par. 730.) No duty rests upon the trial court to provide counsel for a defendant unless he states, upon oath, that he is unable to procure counsel. (People v. Corbett, ante, p. 41; People v. Childers, 386 Ill. 312; People v. Lavendowski, 326 Ill. 173; People v. Kawoleski, 310 Ill. 498.) So far as the common-law record discloses, defendant did not bring himself within the quoted provision of the statute. The right to be represented by counsel is a right personal *590to an accused, which he may waive or claim, as he himself elects. People v. Corbett, ante, p. 41.
Complaint is made that the court did not hear evidence by way of mitigation, or otherwise. The common-law record fails to disclose whether the court heard evidence in mitigation or aggravation of the offense charged. Nor does it show that either the State’s Attorney or the defendant requested an examination of witnesses in this regard. Section 4 of division XIII of the Criminal Code, as it existed in 1939 when defendant was sentenced, provided that where the party pleads “guilty,” his plea shall not be entered until the court shall have fully explained to the accused the consequences of entering such plea, that if the party persists in pleading “guilty,” the plea shall be received and recorded, and that the court shall proceed to render judgment and execution thereon, as if he had been found guilty by a jury. This section provides further, “In all cases where the court possesses any discretion as to the extent of the punishment, it shall be the duty of the court to examine witnesses as to the aggravation and mitigation of the offense.” (Ill. Rev. Stat. 1937, chap. 38, par. 732.) Here, the record recites that the court admonished and explained to defendant the consequences and penalties resultant from his plea of guilty to the crime of rape in the manner and form as charged in the indictment, but that he still persisted in his desire to enter the plea. The recital in the record satisfies the requirements of the first sentence of section 4 of division XIII of the Criminal Code, and it will be presumed, in support of the recital, that the court discharged its duty. (People v. Corbett, ante, p. 41; People v. Childers, 386 Ill. 312; People v. Williams, 383 Ill. 348; People v. Denning, 372 Ill. 549.) The court, under the statute, (Ill. Rev. Stat. 1943, chap. 38, par. 801,) was vested with discretion as to the extent of the punishment.' Defendant’s right to have an examination of witnesses in mitigation of the offense is, however, a personal right and, *591consequently, one which he may waive. (People v. Childers, 386 Ill. 312; People v. Throop, 359 Ill. 354; People v. Crooks, 326 Ill. 266; People v. Pennington, 267 Ill. 45.) In the absence of a showing in a bill of exceptions that either the State’s Attorney or defendant requested an examination of witnesses, the presumption prevails that the defendant waived a hearing on the subject of mitigation. (People v. Throop, 359 Ill. 354.) We are of the opinion, however, that the reason for this presumption fails where the court acts under a misapprehension of the applicable statute and imposes sentence for an indeterminate period instead of for a definite term of imprisonment. , If the trial judge lacked discretion or power in determining the extent of the punishment, as he apparently assumed, there could have been no necessity to hear evidence either in mitigation or in aggravation of the offense. Under these circumstances, the ends of justice require that, upon the remandment, defendant may offer witnesses in mitigation if he so desires and, similarly, if the prosecution chooses, evidence in aggravation of the offense shall be received. We assume that the judgment of the court, entered more than five years ago, directing the sheriff to deliver the defendant to the penitentiary, was executed in June, 1939. This being so, in determining the period of confinement, consideration shall be accorded the fact of defendant’s incarceration for more than five years.
Defendant next contends that a jury waiver should have been required before accepting his plea of guilty. Defendant’s plea of guilty itself constituted a waiver of trial by jury. (People v. Popescue, 345 Ill. 142; People ex rel. Swanson v. Fisher, 340 Ill. 250.) As pertinently observed in the case last cited, “He may certainly plead" guilty, and thus deprive himself of one of the most valuable rights secured to the citizen, that of a trial by jury.”
Finally, defendant contends that he was deprived of a fair and impartial trial, and that, in' particular, he was *592denied due process of law because of the asserted failure to appoint counsel to defend him, thereby affording him a reasonable opportunity to prepare a defense. The error assigned finds no basis in the common-law record, and we can not consider the supporting argument in the absence of a bill of exceptions. People v. Yetter, 386 Ill. 594; People v. Bertrand, 385 Ill. 289.
The judgment of the circuit court of LaSalle county is reversed and the cause remanded, with directions to sentence defendant to a definite term of imprisonment in accordance with the law and the views expressed in this opinion.
Reversed and remanded, with directions.