
687 So.2d 219 (1996)
Tenneyson Ray BENDER
v.
STATE.
CR-95-0614.
Court of Criminal Appeals of Alabama.
November 1, 1996.
*220 Allen C. Jones, Troy, for Appellant.
Jeff Sessions, Atty. Gen., and Thomas Leverette, Asst. Atty. Gen., for Appellee.


*221 ON APPLICATION FOR REHEARING

TAYLOR, Presiding Judge.
This court's opinion issued on August 23, 1996, is withdrawn and the following opinion is substituted therefor.
The appellant, Tenneyson Ray Bender, was convicted of theft of property in the second degree, a violation of § 13A-8-4(g), Code of Alabama 1975. He was sentenced to 18 years in the state penitentiary pursuant to the Habitual Felony Offender Act.
The state's evidence tended to show that on October 17, 1992, the appellant took a pair of cowboy boots valued at $150 from Don Walker's Western Wear, a retail clothing store. The state presented evidence that the appellant had two prior convictions for theft of property in the second degree and the offense of theft of property in the third degree, a misdemeanor, was elevated to theft of property in the second degree, upon application of the Habitual Felony Offender Act.

I
The appellant contends that the trial court erred by denying his motion to suppress evidence seized during the search of his truck. Specifically he contends that his consent to the search was not voluntary because, he says, he had not been read his rights under Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966), before giving his consent. However, "[t]he protections afforded a suspect under Miranda apply only when the suspect is both in custody and being interrogated." United States v. Lawrence, 952 F.2d 1034, 1036 (8th Cir.), cert. denied, 503 U.S. 1011, 112 S.Ct. 1777, 118 L.Ed.2d 434 (1992).
Officer Kenneth Andress with the Troy Police Department testified during the suppression hearing that he responded to a complaint that a pair of cowboy boots was missing from Don Walker's Western Wear. He testified that while he was talking with the store owner, the appellant entered the store. Officer Andress stated that the store owner told him that the appellant had been trying on the boots shortly before he noticed that they were missing. Officer Andress testified that he asked the appellant, "Do you mind if I look in your vehicle?" and that the appellant responded, "Fine. No problem" and voluntarily accompanied Officer Andress out to the truck. Officer Andress then testified that before he opened the door of the truck to search the truck, he saw through the window a pair of boots sitting on the floorboard, which matched the description of those that had been reported stolen.
"`The question whether a consent to search was in fact "voluntary" or was a product of duress or coercion, express or implied, is a question of fact to be determined from the totality of the circumstances.'" Miller v. State, 602 So.2d 488, 491 (Ala.Cr.App.1992) quoting Schneckloth v. Bustamonte, 412 U.S. 218, 93 S.Ct. 2041, 36 L.Ed.2d 854 (1973). "The standard for measuring the scope of a suspect's consent under the Fourth Amendment is that of `objective' reasonablenesswhat would the typical reasonable person have understood by the exchange between the officer and the suspect?" Florida v. Jimeno, 500 U.S. 248, 250, 111 S.Ct. 1801, 1803-04, 114 L.Ed.2d 297 (1991). An examination of the totality of the circumstances in this case reveals that the appellant's consent was voluntary.
However, it was not necessary for the appellant to consent to a search of his truck because boots matching the description of those stolen were in "plain view" through the window of the truck.
"It is a fair generalization that if a law enforcement officer is able, by the use of his natural senses, to discover what is inside a vehicle while `standing in a place where he had a right to be,' this discovery does not constitute a Fourth Amendment search."
W. LaFave, 1 Search & Seizure § 2.5(c) at 449 (2d ed. 1987). The trial court did not err in denying the appellant's motion to suppress evidence seized from his truck.

II
The appellant next contends that § 13A-8-4(g), Code of Alabama 1975, is unconstitutional. Specifically, he contends that because § 13A-8-4(g) may use a conviction that occurred before the enactment of the *222 statute to elevate the current crime, it constitutes an ex post facto law.
When this same issue was presented in challenge to the Habitual Felony Offender Act, this court upheld that act. As the court stated in Chambers v. State, 418 So.2d 948 (Ala.Cr.App.1982):
"Consideration of a defendant's prior convictions in sentencing him pursuant to the Habitual Offender Act does not give the act efficacy as a constitutionally prohibited ex post facto law, even though such prior convictions occurred before the effective date of the act. Ray v. State, 398 So.2d 774, 776 (Ala.Cr.App.), cert. denied, 398 So.2d 777 (Ala.1981), and authorities cited therein. The important consideration is that, at the time appellant contemplated committing the instant felony, he was charged by law with knowledge that if he committed the felony he would be subject to punishment under the Habitual Offender Act. Coker v. State, 396 So.2d 1094 (Ala.Cr.App.1981)."
Chambers, 418 So.2d at 950.
Likewise, when the appellant in this case committed the crime of theft of property in the third degree after previously having been convicted of theft of property in the second degree, he was charged by law with knowledge that the charge would be elevated to theft of property in the second degree.

III
The appellant next contends that the trial court erred by allowing the state to present evidence of the appellant's prior conviction for theft of property in the second degree to prove an element of the present charge. Because the trial court thoroughly instructed the jury to disregard the prior offense when considering the guilt or innocence of the appellant, and because the prior conviction was an element of the charged offense, the trial court correctly received the evidence of the prior conviction. Cain v. State, 562 So.2d 306 (Ala.Cr.App.1990).

IV
The appellant last contends that the trial court illegally sentenced him when it used two previous felony convictions to enhance his sentence under the Habitual Felony Offender Act, § 13A-5-9, Code of Alabama 1975, because, he says, one of the previous felonies was a necessary element of the offense itself. Based on the Alabama Supreme Court's holding in Gholston v. State, 620 So.2d 719 (Ala.1993), the appellant's sentence was not outside that which is provided by law.
The appellant made no objection at the time that he was sentenced. However, the Alabama Supreme Court in Ex parte Brannon, 547 So.2d 68 (Ala.1989) stated that, "when a sentence is clearly illegal or is clearly not authorized by statute, the defendant does not need to object at the trial level in order to preserve that issue for appellate review." Because the appellant's sentence was not illegal and because there was no objection, this issue is not correctly before this court. Holifield v. State, 520 So.2d 240 (Ala.Cr.App.1987).
For the reasons stated above this case is due to be, and is hereby, affirmed.
APPLICATION FOR REHEARING GRANTED; RULE 39(k) MOTION DENIED; ORIGINAL OPINION WITHDRAWN; OPINION SUBSTITUTED; AFFIRMED.
All the Judges concur.
