An information was filed in the district court for Ha'll county on August 1, 1922, in which it was charged that Martin McElhaney, the relator herein, late of such county, did on or about July 28, 1922, in the county aforesaid, “into a certain dwelling house of Hans Wiese, situated in the county of Hall, in the state of Nebraska, unlawfully, * * * and feloniously, break and enter, with the intent then and there and thereby the goods and chattels, to wit, a suit of clothes of the value of twenty-five dollars the property of Hans Wiese, then and there being, unlawfully, * * * to steal, take and carry away,” ■ etc. To which information the accused pleaded guilty, and was so found and sentence entered, “That he be taken to the penitentiary of the state of Nebraska and there confined at hard labor, Sundays and legal holidays excepted, for not more than twenty years or less than three years, as the same may hereafter be determined by the state prison board.” From this judgment error proceedings were not prosecuted. Afterwards, on July 26, 1926, in the district court for Lancaster county, this proceeding was instituted seeking his discharge from such imprisonment upon a writ of habeas corpus. On the issues being duly joined and trial had, the writ was .denied and relator remanded. To reverse this judgment relator appeals.
It is clear from a reading of the information and comparing the allegations therein contained with section 9623, Comp. St. 1922, that the crime charged comes within the provisions of such section, and not within those of section 9624. The former section applies solely to the unlawful entering of a building with intent to commit some distinct act therein specifically designated; the latter section to the unlawful entering of the building and the committing or attempting to commit one of the acts in the section enumerated, after so being therein. Smith v. State, 68 Neb. 204.
*301Relator insists that the trial and conviction were had under section 9623, supra, but that the punishment applied was that provided for in section 9624. In this latter the state disagrees, and, as we are impelled to conclude, rightly so. From the record the trial was had under the statute covered by the information, and the judgment rendered with such statute in mind. This inference is of such potency as to place it beyond question. While section 9623 provides that the punishment for a breach thereof shall be imprisonment in the penitentiary not more than ten years nor less than one year, etc., and the judgment in question sentenced the relator to not more than twenty years nor less than three years, the placing of the minimum at three years, instead of at one year, was clearly within the discretionary power vested in the trial court by section 10248, Comp. St. 1922, as we held in Pointer v. State, 114 Neb. 13.
The fixing of the sentence at not more than twenty years was erroneous, but did not render the judgment void. It stands as valid and enforceable for the term that the statute authorized the court to impose sentence, to wit, for not more than ten years. However, while error was thus committed in entering the judgment, if the proper proceedings had been had looking to the correction thereof, the judgment would have been modified to conform with the provision of the statute. As we have seen, such proceedings were not had, hence, while the error remains, “Habeas corpus will not lie on behalf of a convicted prisoner on the ground that the sentence to imprisonment is in excess of the statutory period, since such a sentence is erroneous merely, and not void.” In re Fanton, 55 Neb. 703.
The court was vested with jurisdiction, and the judgment is'valid for the term authorized by the statute, to wit, not more than ten years, and after that becomes, and will be, inoperative. Error was not committed by the trial court in disallowing the writ and remanding the relator.
Affirmed.