
962 S.W.2d 302 (1998)
Lealon Keith HOLLIE, Appellant,
v.
The STATE of Texas, Appellee.
No. 01-95-00616-CR.
Court of Appeals of Texas, Houston (1st Dist.).
February 12, 1998.
*303 Ross Palmie, Houston, for Appellant.
John Julian Moore, Columbus, for Appellee.
Before NUCHIA, MIRABAL and O'CONNOR, JJ.

OPINION ON MOTION FOR REHEARING
NUCHIA, Justice.
Appellant has filed a motion for rehearing. We withdraw our opinion dated December 4, 1997, and substitute this opinion in its place.
A jury found appellant, Lealon Keith Hollie, guilty of the misdemeanor offense of driving while intoxicated (DWI). The trial court assessed punishment at six months confinement, probated for two years, and a fine of $1,000.00. We modify the judgment to correct a sentencing error and affirm the judgment as modified.

Facts
Appellant was charged by information with the misdemeanor offense of DWI.[1] Before trial, appellant moved to suppress all evidence against him, claiming that it was obtained as the result of a traffic stop made without reasonable suspicion. The trial court held a hearing on appellant's motion, and, while it apparently meant to overrule appellant's motion, it never expressly did so. The evidence was admitted at trial.
At appellant's request, the trial court adopted a jury instruction based on article 38.23 of the Code of Criminal Procedure.[2]See TEX.CODE CRIM. P. ANN. art. 38.23(a) (Vernon Supp.1998). The State agreed to this instruction.

Legal Sufficiency
In his sole point of error, appellant asserts that evidentiary sufficiency is measured by the actual charge given, and argues that the determination of reasonable suspicion instruction became an element of his offense. He claims the State did not present sufficient evidence with respect to this "element."
The sufficiency of the evidence is measured only by the elements of the offense as defined by the hypothetically correct jury charge for the case. Malik v. State, 953 S.W.2d 234, 240 (Tex.Crim.App.1997). The hypothetically correct charge is one that, for example, accurately sets out the law, is authorized by the indictment, does not unnecessarily increase the State's burden of proof or restrict the State's liability theories, and adequately describes the particular offense for *304 which the defendant was tried. Id. The Benson v. State, 661 S.W.2d 708 (Tex.Crim.App. 1982). Boozer v. State, 717 S.W.2d 608 (Tex. Crim.App.1984)[3] line of cases cited by appellant was expressly overruled by Malik. See Malik, 953 S.W.2d at 239.
In Malik, the appellant was found guilty of carrying a handgun. Id. at 234. An instruction required the jury to acquit the appellant if it found no reasonable suspicion to stop his car. Id. at 236. On appeal, the appellant argued the evidence was legally insufficient to convict him, because it was insufficient to show a reasonable suspicion to stop him. Id. at 235. The Malik court held that the legality of the appellant's detention could not be used to measure the sufficiency of the evidence: the detention issue went to the evidence's admissibility and was not an element of the offense charged. Id. at 240.
Here, appellant was charged with DWI. A person commits the offense of DWI if he is intoxicated while driving or operating a motor vehicle in a public place. TEX. PEN.CODE ANN. § 49.04(a) (Vernon 1994). As in Malik, the legality of appellant's detention, which relates to the admissibility of evidence, is not an element of this offense. Therefore, we may not measure the evidence's sufficiency by it. See id. at 240.
Appellant admits that, but for his reasonable suspicion argument, the evidence was legally sufficient to support his DWI conviction. Neither does he challenge the trial court's de facto denial of his suppression motion. We overrule appellant's sole point of error.

Sentencing
In his motion for rehearing, appellant complains for the first time that part of his sentencing exceeded the punishment allowed. Appellant was convicted for misdemeanor DWI. See TEX. PENAL CODE ANN. § 49.04(a), (b) (Vernon 1994). The trial court assessed punishment at six months confinement, probated for two years, and a fine of $1,000.00. As a condition of probation, the trial court sentenced appellant to 45 days confinement in the county jail. However, article 42.12 § 12(a) of the Code of Criminal Procedure provides a maximum of only 30 days confinement as a condition of community supervision in misdemeanor cases. TEX.CODE CRIM. P. ANN. art. 42.12, § 12(a) (Vernon Supp.1998).
If a punishment is not authorized by law, the portion of the sentence imposing that punishment is void. See, e.g., Heath v. State, 817 S.W.2d 335, 336, 339 (Tex.Crim. App.1991); Wilkerson v. State, 927 S.W.2d 112, 115 (Tex.App.Houston [1st Dist.] 1996, no pet.). A defect rendering a sentence void may be raised at any time. See, e.g., Heath, 817 S.W.2d at 336; State v. Rowan, 927 S.W.2d 116, 117-18 (Tex.App.Houston [1st Dist.] 1996, no pet.). Accordingly, we modify the judgment to reflect 30 days confinement in the county jail as a condition of probation.[4]See TEX.CODE CRIM. P. ANN. art. 42.12, § 12(a); TEX.R.APP. P. 43.2(b).
We affirm the judgment as modified.
NOTES
[1]  See Tex. Penal Code Ann. § 49.04(a) (Vernon 1994).
[2]  The trial court instructed the jury regarding evidence obtained as the result of an investigative detention as follows:

"You are instructed that under our law no evidence obtained or derived by an officer or other person as a result of an unlawful stop and detention shall be admissible in evidence against such accused. You are instructed that weaving is not a criminal offense. An officer is permitted, however, to make a temporary investigative detention of a motorist if the officer has a reasonable suspicion that some activity out of the ordinary is or has occurred, that the person detained is connected with such activity, and that there is some indication that the activity is related to crime or a criminal offense. Now, bearing in mind these instructions, if you find from the evidence that on the occasion in question the defendant... was not driving his vehicle ... in manner [sic] giving the officer a reasonable suspicion that some activity out of the ordinary was or had occurred, and that the person detained was connected with such activity, and that there was some indication that the activity was related to a crime or criminal offense, immediately preceding his stop and detention by the police officer involved herein, or you have a reasonable doubt thereof, then such stopping of the accused would be illegal, and if you find the facts so to be, or if you have a reasonable doubt thereof, you will disregard the testimony of the officer relative to his stopping the defendant and his conclusions as a result thereof and you will not consider such evidence for any purpose whatsoever." (Emphasis added.)
[3]  Boozer v. State, 717 S.W.2d 608 (Tex.Crim.App. 1984); Benson v. State, 661 S.W.2d 708 (Tex. Crim.App.1982); see also Arceneaux v. State, 803 S.W.2d 267, 271-72 (Tex.Crim.App. 1990). In passing, we note that the instruction appellant received does not, as he claims, "authorize a conviction." Compare Arceneaux, 803 S.W.2d at 271-72. Therefore, appellant's point of error would lack merit even under the line of cases on which he relies.
[4]  We find Turk v. State, which appellant claims requires remanding for a new sentencing hearing instead of modifying the judgment, distinguishable. See id., 867 S.W.2d 883, 888 (Tex.App. Houston [1st Dist.] 1993, pet. ref'd).
