This matter comes before this court upon a petition filed by Richard (Dick) Rice in the district court for Lancaster county, praying that, a writ of habeas corpus may issue. This application was denied by the district court.
On July 30, 1943, a petition was filed in the district court for Lancaster county, which sets out that the petitioner is a Winnebago Indian by birth, and a resident of Winnebago, Nebraska, and is a ward of the federal government; that on June 10, 1935, he was tried and convicted in the district court for Thurston county at Pender on an information of the county attorney charging him with the offense of breaking and entering a building located in Thurston county, and carrying away property of the value of $35, and was' sentenced to a term of one year in the men’s reformatory near *548Lincoln, Nebraska, and served ten months, and was discharged on April 10, 1936.
This petition then charges that thereafter on May 22, 1940, an information was filed, charging petitioner and one Joe Bigbear with forcibly breaking and entering into a certain dining hall in the village of Winnebago on May 17, 1940, which dining hall is owned by the Winnebago Indian Mission of the Reform Church in America, with the intent to steal property of value contained in said building, and on October 14, 1940, defendant waived preliminary hearing in the county court and was arraigned upon information filed for burglary in the district court and pleaded guilty thereto; that thereupon section 28-538, Comp. St. 1929, was read to him, and he was then asked if, after knowing what penalty could be inflicted upon him under his plea of guilty, he still desired to plead guilty, to which question of the court he replied in the affirmative, and having stated that he had nothing to say before sentence was pronounced he was thereupon sentenced by the district court to hard labor in the penitentiary for a period of one to seven years.
It is charged that the trial court did not advise the petitioner of his constitutional rights to have counsel and witnesses, or to be charged and informed against by indictment of a grand jury, which is guaranteed under the Fourteenth, the Fifth, and the Sixth Amendments to the Constitution of the United States, nor of his right to a trial by jury, guaranteed by section 6, art. I of the Nebraska Constitution, and that said petitioner did not waive those constitutional rights either by action or words, and that such rights cannot be waived by agreement of the parties, and it is charged that he was convicted by a court of competent jurisdiction and deprived of his constitutional right of due process of law; that no jurisdiction rested in the trial court, or over the person of the accused, because the alleged crime was committed on an Indian reservation and without and beyond the jurisdiction of the trial court.
It is also charged that judgment of conviction is unconstitutional and void in that the trial court imposed an inde*549terminate sentence of from one to seven years instead of a flat or definite sentence, as by law required, in that petitioner had previously served a sentence in a penal institution at the men’s reformatory. See Comp. St. 1929, sec. 29-2620.
It is further charged in said petition that the petitioner is an Indian of the Winnebago tribe, and the same is under the exclusive jurisdiction of the federal government, and without the jurisdiction of the trial court.
The petitioner further charges that, after being confined in the Nebraska state penitentiary for 18 months he employed counsel, who advised him that his proper remedy was to file a writ of error coram nobis with the trial court, and petitioner’s sister paid said counsel $75 to prepare said petition, which petition was dismissed October 5, 1942.
It is further charged that under section 29-1803, Comp. St. 1929, it was mandatory upon the district' court to assign counsel to guard and enforce rights guaranteed under the Fourteenth Amendment to the United States Constitution.
It is further charged that he was deprived of his right to be served with a copy of the information and given 24 hours thereafter within which he might examine the charge and prepare a defense.
Because of these allegations, the petitioner prays that a writ of habeas corpus may issue, directing Neil Olson, warden of the penitentiary, to bring the petitioner before the court to determine the facts and legality of the petitioner’s imprisonment and dispose of the petitioner as law and justice may require, and release him from such false imprisonment, and that he may go hence without day.
The federal Constitution does provide, in article V of the Amendments, as charged in the petition, that no person shall be held to answer for a crime such as was charged in this case unless upon an indictment of a grand jury, but section 10, art. I of the Constitution of Nebraska provides that the legislature may provide for holding such persons upon the information of the public prosecutor, and section 26-901, Comp. St. 1929, provides that when a county attor*550ney has sufficient evidence he is authorized to file such proper complaint as was done in this case, in strict accordance with the Nebraska Constitution and laws.
It is also claimed in the petition that the petitioner is a Winnebago Indian and is under the exclusive jurisdiction of the federal government, and without the jurisdiction of the district court of Nebraska. However, chapter 15, title 18, U. S. C. A., sec. 548, of the federal Penal Code, provides generally that all Indians committing a crime, either within or without an Indian reservation within the boundaries of a state, shall be subject to the same laws, and tried in the same courts, and subject to the same penalties as all other persons.
It is contended that it was mandatory for the district court to assign counsel to assist the defendant. In Alexander v. O’Grady, 137 Neb. 645, 290 N. W. 718, and Davis v. O’Grady, 137 Neb. 708, 291 N. W. 82, this court has adopted the rule to be: “The constitutional right of accused to have the assistance of counsel may be waived, and a waiver will be implied where accused, being* without counsel, fails to demand that counsel be assigned him.” 16 C. J. 821. .
“It is not necessary that there be a formal waiver; and a waiver will ordinarily be implied where accused appears without counsel and fails to request that counsel be assigned to him, particularly where accused voluntarily pleads guilty.” 23 C. J. S. 314, sec. 979.
Judge Parker, of the Fourth Circuit Court of Appeals, said: “We do not think that the plea of guilty was vitiated or that the sentence imposed was avoided by reason of the fact that appellant was not represented by counsel in the District Court. Where an accused personally enters a plea of guilty to a crime whereof he stands charged, and does so understanding^, freely and voluntarily without asking the assistance of counsel, a waiver of the right to be represented by counsel may fairly be inferred. Logan v. Johnston, D. C., 28 F. Supp. 98; Erwin v. Sanford, D. C., 27 F. Supp. 892.” Cundiff v. Nicholson, 107 Fed. 2d 162.
*551It is charged that petitioner was deprived of his right to be served with a copy of the accusation and given 24 hours within which to examine the charge and prepare his defense. It is contended that this is a substantial right which it is error to deny. The case of Zink v. State, 34 Neb. 37, 51 N. W. 294, is cited, but in that case Zink did not plead guilty, while in the instant case the defendant did enter such a plea.
“A defendant, by pleading guilty, waives all defenses other than that the indictment charges no offense.” 14 Am. Jur. 952, sec. 272.
“A plea of guilty, accepted and entered by-the court, is a conviction or the equivalent of a conviction of the highest order, the effect of which is to authorize the imposition of the sentence prescribed by law on a verdict of guilty of the crime sufficiently charged in the indictment or information.” 14 Am. Jur. 952, sec. 272.
“A plea of guilty admits all facts sufficiently pleaded, confesses the indictment or information to be wholly true, with respect to each and every allegation, operates as a waiver of any defense, and of the constitutional right to a trial by jury, and with it, of course, the constitutional guarantees with respect to the conduct of criminal prosecutions.” 2 Standard Ency. of Procedure, 895.
“ ‘A plea of guilty waives any defect not jurisdictional, and which may be taken advantage of by motion to quash or by plea in abatement.’ 16 C. J. 403.” State ex rel. Gossett v. O’Grady, 137 Neb. 824, 291 N. W. 497.
In the case at bar, as the record shows affirmatively that the defendant had pleaded guilty, this absolutely waived this and all other preliminary steps in connection therewith, so this allegation has no merit.
In this petition for habeas corpus, it is charged that the sentence is unconstitutional and void because it is an indeterminate sentence of one to seven years after he had served a previous sentence on a similar charge.
The present record does disclose his prior sentence of one year to the state reformatory for a felony, and it appears *552that the legislature did not contemplate that a second indeterminate sentence should be given. The trial court, either through inadvertence or misapprehension, appears to have given a different sentence, that is, a lighter sentence than might have been given. This frequently occurs when an entire stranger is arrested in our state and claims it is his first felony and receives an indeterminate sentence as a first offender, but when it appears somewhat later that he was actually a second offender, that does not make the sentence given illegal or void. Doubtless the board of paroles and pardons can consider such facts in later consideration of the exact time of his discharge.
In McElhaney v. Fenton, 115 Neb. 299, 212 N. W. 612, the trial court gave a sentence of not less than three years nor more than twenty years, while the statute provided that the maximum sentence should not be more than ten years. It was held that, while the sentence was erroneous, it was not void, and it would stand for the term that the law authorized. It was held that on an application for a writ of habeas corpus, errors and irregularities, not jurisdictional, will not be considered.
In the case of Hulbert v. Fenton, 115 Neb. 818, 215 N. W. 104, it was said that habeas corpus is a collateral, and not a direct, proceeding as a means of an attack upon a judgment and sentence regular upon its face, and no extrinsic evidence is admissible in a habeas corpus proceeding to show its invalidity. See In re Evans, 173 Mich. 25, 138 N. W. 276.
The judgment of the trial court was right, and it is hereby affirmed.
Affirmed.