On the 26th of May, 1882, an information was filed accusing the defendant of a misdemeanor, to which information the defendant demurred. The demurrer was argued and submitted. On the 15th of July, after the court had in open court intimated its intention to sustain the demurrer, the district attorney filed a second information based on the same offense. No leave of the court was asked or given for filing the second information. On the 22d of July the court made an order sustaining the demurrer to the first information—but no order was made or requested, or opinion expressed, as provided for in section 1008 of the Penal Code. The defendant then moved to dismiss the prosecution on the second information, which ivas granted, on the ground that the sustaining of the demurrer to the first information, without directing the filing of a new information, the second being substantially the same as the first, and for the same offense is final under section 1008 of the Penal Code, and is a bar to another prosecution; and the defendant was discharged and his bail exonerated.
From this order the people appealed.
We think the action of the court below, as to the second information, was correct. It makes no difference that the second information was filed before the judgment on the demurrer.
When the judgment on demurrer ivas rendered, there being no *220direction for a new information or re-submission, it became and was a bar to another prosecution for the same offense. The legislature seem, in the section referred to, to have made a second prosecution in case of demurrer sustained, depend upon the judicial opinion of the court that the objection raised by the demurrer may be avoided on a new information; and in the absence of such opinion the prosecution for that offense is at an end. People v. Allen, 61 Cal. 140, was not the case of demurrer sustained.
Order affirmed.