
531 So.2d 317 (1988)
Ricky Dale BROTHERS
v.
STATE.
7 Div. 931.
Court of Criminal Appeals of Alabama.
March 8, 1988.
Rehearing Denied June 14, 1988.
Certiorari Denied August 26, 1988.
*318 Kathleen Warren, Gadsden, for appellant.
Don Siegelman, Atty. Gen., and Sandra Lewis, Asst. Atty. Gen., for appellee.
Alabama Supreme Court 87-1137.
McMILLAN, Judge.
The appellant was indicted for burglary in the third degree, theft of property in the first degree, and arson in the second degree. He pleaded guilty to burglary in the third degree and theft of property in the first degree, with the arson charge being continued under the condition that the charge would be dismissed if the appellant pleaded guilty to the other offenses and did not appeal. The appellant was sentenced to life imprisonment pursuant to the Habitual Felony Offender Act and was ordered to pay restitution for the full replacement value of the house and its contents which were destroyed in the fire resulting from the arson.

I
The appellant alleges that the trial court erred in ordering him to pay restitution for damage to the property caused by arson when he was not convicted of arson and did not admit that his criminal activity resulted in the damage which was caused by the arson. According to § 15-18-65, Code of Alabama (1975):
"The legislature hereby finds, declares and determines that it is essential to be fair and impartial in the administration of justice, that all perpetrators of criminal activity or conduct be required to fully compensate all victims of such conduct or activity for any pecuniary loss, damage or injury as a direct or indirect result thereof. The provisions of this article shall be construed so as to accomplish this purpose and to promote the same which shall be the public policy of this state."
The State argues that the damage caused by the arson was an "indirect result" of the appellant's criminal activity.
According to § 15-18-67, Code of Alabama (1975), "[w]hen a defendant is convicted of a criminal activity or conduct which has resulted in pecuniary damages or loss to a victim, the court shall hold a hearing to determine the amount or type of restitution due the victim or victims of such defendant's criminal acts." "Criminal activities" is defined in this Article by § 15-18-66, as "[a]ny offense with respect to which the defendant is convicted or any *319 other criminal conduct admitted by the defendant."
The appellant did not admit committing arson, nor was he convicted of committing arson. This case is distinguishable from Ex parte Clare, 456 So.2d 357 (Ala.1984). The appellant in Clare was ordered to pay restitution for monies embezzled in an amount greater than that involved in the indictment. However, she admitted embezzling monies which rightfully belonged to her employer and was convicted of embezzling.
The burning of the victim's house was not an indirect result of the theft or burglary under § 13A-2-5, Code of Alabama (1975). This statute addresses the causal relationship between conduct and results, and states:
"(a) A person is criminally liable if the result would not have occurred but for his conduct, operating either alone or concurrently with another cause, unless the concurrent cause was sufficient to produce the result and the conduct of the actor clearly insufficient.

"(b) A person is nevertheless criminally liable for causing a result if the only difference between what actually occurred and what he intended, contemplated or risked is that:
"(1) A different person or property was injured, harmed or affected; or
"(2) A less serious or less extensive injury or harm occurred."
The commentary to this section states:
"Following the lead of other modern criminal codes, this section is a modified `but for' test, with an express exclusion of those situations in which the concurrent cause was clearly sufficient to produce the result and the defendant's conduct clearly insufficient.... If the actual result is not within the contemplation of the actor, or within the area of risk of which he should have been aware, he is not deemed to have `caused' the result."
Clearly the appellant's acts of breaking and entering and committing theft were not the cause of the burning of the victim's house; rather, the act of committing arson was the cause. The burning of the house would not have been within the contemplation of the appellant in committing burglary or theft. Therefore, the trial court erred in ordering the appellant to pay restitution for the property damaged by the arson.

II
The appellant alleges that he was improperly sentenced under the Habitual Felony Offender Act as a three-time convicted felon when he had only two prior convictions. The conviction in question concerned a burglary in the third degree and theft in the second degree conviction which received only one sentence. See § 15-3-8, Code of Alabama (1975). The State contends that the offenses should be treated as separate convictions, despite their receiving a single sentence, while the appellant argues that they should constitute only one conviction for habitual felony offender purposes. There was no disagreement as to another prior conviction for burglary in the second degree.
During the sentencing hearing, the trial court stated:
"I'll be very honest with you, if the Court took [defense counsel's argument as to how to treat the two offenses that were in State's Two, I think there's no question, even under your attorney's point of view that you have two prior felonies. That's her point of view. Even under that situation you would be looking at a possibility of Life or up to Life, I should say. And I'll be honest with you, if the Court ruled in that regard I would look very strongly at a Life Sentence based on what's occurred and what's happened, but the Court feels, at least based on my understanding of the law in regard to the transactions and occurrences as we've talked about here today that you have three prior felonies, and let me state this very specifically for the record so we don't have any misunderstandings on this."
The sentence which the appellant received was authorized under either situation. The appellant was sentenced pursuant to his *320 conviction for theft of property in the first degree, which is a Class B felony. Where a defendant has previously been convicted of three felonies and is convicted of a Class B felony, he must be punished for life in the penitentiary. Where he is convicted of a Class B felony and has previously been convicted of two felonies, "he must be punished by imprisonment for life or for any term of not more than 99 years but not less than 15 years." § 13A-5-9, Code of Alabama (1975). The trial court stated that he would have sentenced the appellant to life imprisonment in either case. "`[A]ny error in proving prior convictions in excess of the number needed to invoke the Habitual [Felony] Offender Act is error without injury, where the evidence of the unneeded prior convictions did not prejudice the defendant.' Smith v. State, 401 So.2d 251, 256-57 (Ala.Cr.App.), cert. denied, Ex parte Smith, 401 So.2d 257 (Ala.1981)." Peoples v. State, 457 So.2d 1000 (Ala.Cr.App.1984). See also Ex parte Thomas, 435 So.2d 1324, 1326 (Ala.1982).
ORDER OF RESTITUTION TO VICTIM VACATED; JUDGMENT OF CONVICTION AND SENTENCE AFFIRMED.
BOWEN, P.J., and TYSON, J., concur.
PATTERSON, J., dissenting with opinion; TAYLOR, J., joins dissent.
PATTERSON, Judge (dissenting.)
I respectfully dissent from the holding of the majority in Issue II. I do not agree with the majority's interpretation of the trial judge's comments, particularly the finding that the trial judge would have sentenced appellant to life imprisonment in either case. In my opinion, we should address the merits of the issue of whether the two convictions, for which appellant received a single sentence, should be treated as one or two convictions for purposes of sentencing under the Habitual Felony Offender Act.
