
235 Cal.App.3d 899 (1991)
1 Cal. Rptr.2d 434
THE PEOPLE, Plaintiff and Respondent,
v.
CHARLES EDGAR THOMAS, Defendant and Appellant.
Docket No. A050646.
Court of Appeals of California, First District, Division Three.
October 30, 1991.
*901 COUNSEL
J. Courtney Shevelson, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, John H. Sugiyama, Assistant Attorney General, and Deborah D. Factor, Deputy Attorney General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
*902 OPINION
MERRILL, J.
A jury convicted appellant Charles Edgar Thomas of attempted premeditated murder (Pen. Code, §§ 187, subd. (a); 664),[1] assault with a firearm upon a peace officer (§ 245, subd. (c)), cruelty to an animal (§ 597, subd. (a)), first degree burglary (§ 459), and four separate firearm possession charges (§§ 12021, subd. (a) [two counts]; 12020, subd. (a); 12025, subd. (a)). The jury also found appellant was both armed with and used a firearm during the commission of the attempted murder, assault, and infliction of cruelty to an animal (§§ 12022, subd. (a); 12022.5), and was armed with a firearm during the burglary (§ 12022, subd. (a)). The court found appellant had suffered three prior serious felony convictions (§ 667) and had served one prior prison term (§ 667.5, subd. (b)).
The court sentenced appellant to a total determinate term of 24 years, 4 months, which included 16 years for the prior felony convictions and prison sentence; the court made the determinate term consecutive to a term of life with the possibility of parole imposed for the attempted murder.

I
On the afternoon of February 8, 1989, Santa Rosa Police Officer Lance Badger pulled a car over because it was emitting excessive smoke and did not have a current registration sticker. Appellant was driving the car, but did not have a license or any other identification. Consequently, Officer Badger ordered appellant to step out of the car and stand behind it. Appellant told Badger his name was Thomas Wayne Price, gave a birthdate of October 11, 1953, and claimed he had a valid Washington State driver's license. Officer Badger radioed this information to the police dispatcher, but the dispatcher could not get a match for a Washington driver's license. However, the dispatcher gave Officer Badger the description of a potentially armed and dangerous escaped convict from Oregon that matched appellant.
After Badger called for backup, he approached appellant and attempted to pat-search him, telling appellant he just wanted to check for weapons. As Badger started the pat-search, appellant reached into the small of his back and drew a semiautomatic pistol. Officer Badger stepped back and drew his own weapon. Badger and appellant both fired two shots at each other almost simultaneously. Appellant's shots missed their mark, and appellant and Badger retreated to their respective vehicles. Appellant fired four more shots *903 into the windshield of Badger's patrol vehicle, and then fled over a fence and into the backyard of a nearby residence where he shot and wounded a dog.
Shortly thereafter, other officers arrived and searched the area for appellant. The officers failed to find him, and all but two officers had left the area by about 5 p.m.
Jeffery and Kathleen Hemphill lived on the same street where the shoot-out occurred. They returned home at about 5:15 p.m. and discovered that the door which led from their attached garage into their kitchen had been pried open with a crowbar. Inside the house they found spots of blood in several places and a bloodstained rag in the bedroom. Bandages and medical supplies had been moved from the master bathroom to the guest bedroom. Guns, ammunition and clothing were missing from the house.
Mrs. Hemphill, who had seen police cars parked down the street, went to speak with an officer. As she walked down the street, she saw appellant walking ahead of her carrying a gym bag. She contacted Detective Brian Davis, reported the burglary, and pointed to appellant as a possible suspect.
Detective Davis detained appellant and Officer Badger positively identified him as the person involved in the shoot-out. When the shooting took place, appellant had been wearing a gray, pin-striped leisure suit and had a mustache. When Detective Davis detained him, he was wearing a light brown jacket, a red flannel shirt, blue jeans and cowboy boots, and was clean shaven. Appellant was carrying a gym bag which contained a.22 semiautomatic pistol and a large quantity of ammunition. He was also armed with a .380 pistol and a .22 revolver. Shell casings test-fired from the .22 semiautomatic pistol matched casings found at the scene of the shoot-out.
The clothes appellant was wearing when detained, the gym bag, the .380 pistol, the .22 revolver and the ammunition, all belonged to Jeffery Hemphill. Appellant's gray suit was found in the Hemphills' guest bedroom, and there was evidence he had used Mr. Hemphill's razor. Finally, his fingerprints were found on beer bottles recovered from the house.
After he was arrested, appellant was treated for a gunshot wound to his right hand. He told the treating physician he had been injured in an explosion, but the wound was not consistent with that kind of trauma.

II
(1a) Appellant's first contention on appeal is that the prosecutor misstated the law of burglary in his closing argument, and that this alleged error *904 was compounded by the trial court's instructions defining burglary for the jury. Specifically, appellant asserts that the prosecutor erred in arguing to the jury that he could be convicted of burglary as long as he had formed an intent to steal at the time that he broke into the living area of the house from the garage, regardless of whether he had such an intent when he first entered the garage itself. According to appellant, such a scenario could not constitute burglary because the garage itself was an integral part of the house, merely constituting one room among others, which together composed a single inhabited dwelling for purposes of the law of burglary. Thus, under appellant's interpretation, it would be necessary for appellant to have had a felonious intent at the time that he first entered the garage in order to be found guilty of burglary as charged in the information.
Appellant's argument is unpersuasive. He was charged with, convicted of, and sentenced for the felony of "residential burglary." Section 459, the statutory basis for appellant's burglary charge, provides in pertinent part as follows: "Every person who enters any house, room, apartment, tenement, [or] shop, ... with intent to commit grand or petit larceny or any felony is guilty of burglary." (Italics added.) Section 460 in turn defines first degree burglary as "[e]very burglary of an inhabited dwelling house...." The pertinent evidence in this case shows that at the time in question, the door leading from the Hemphills' garage into the living quarters of their house was locked or secured; after appellant had entered the Hemphills' garage, he pried open the locked door leading from the garage into the living quarters with the use of a crowbar; and, once inside the house, he stole various articles belonging to the Hemphills, including medical supplies, guns, ammunition, and clothing.
(2) Under the statutory definitions quoted above, any person who enters a house or an inhabited dwelling, or a room in such a house or dwelling, with the intent to commit theft, is guilty of burglary. (People v. Mackabee (1989) 214 Cal. App.3d 1250, 1254-1255 [263 Cal. Rptr. 183]; People v. Wilson (1989) 208 Cal. App.3d 611, 615 [256 Cal. Rptr. 422]; People v. Edwards (1971) 22 Cal. App.3d 598, 602 [99 Cal. Rptr. 516]; People v. Gaytan (1940) 38 Cal. App.2d 83, 87 [100 P.2d 496].) Thus, it has long been the law of this state that "[a] person is guilty of burglary who enters a room with the intention to commit a theft. [Citations.]" (People v. Edwards, supra, 22 Cal. App.3d at p. 602 [defendant entered the women's restroom in the cafeteria which was part of a hospital, where he had a right to be, to commit a theft; held, his entry constituted burglary]; People v. Mackabee, supra, 214 Cal. App.3d at p. 1253 [office space in lobby of a public building, separated from the lobby by a waist-high counter, is a "room" for purposes of the burglary statute, 459]; see also People v. Deptula (1962) 58 Cal.2d 225, 228 [23 Cal. Rptr. 366, 373 P.2d 430] [defendant manager of bowling alley *905 entered interior office with intent to steal; killing of janitor was felony murder]; People v. Young (1884) 65 Cal. 225, 226 [3 P. 813] [defendant, with requisite felonious intent, entered ticket office within waiting room of train station].)
(1b) Appellant does not dispute the fact that the evidence established that he formed an intent to steal before forcibly entering the kitchen from the garage. Appellant argues, however, that the cited cases are distinguishable from the instant facts because of the principle that where a garage is an attached, integral part of a house, it must be considered simply one room of several which together constitute the dwelling for purposes of burglary. (People v. Moreno (1984) 158 Cal. App.3d 109, 112 [204 Cal. Rptr. 17].)
Appellant's contention is not well taken. In the first place, the principle upon which he relies has been taken out of context. In People v. Moreno, supra, the defendant stole items from a garage without entering the house itself. On appeal, he argued that entry of the garage did not constitute entry of an "inhabited dwelling" for purposes of section 460. The only issue was whether the entry of the garage with intent to commit theft was, by itself, a burglary. (158 Cal. App.3d at p. 112.) Accordingly, the principle that a garage may be considered part of an inhabited dwelling was used to uphold a finding of burglary, not to place a limitation on the definition of burglary. The court was not presented with the situation here, where appellant forcibly and without consent entered the living quarters of a house after having already come into the garage.
Secondly, appellant's argument completely ignores the express language of the applicable statutes. Section 459 includes within the definition of burglary the entry of a "room" with intent to commit larceny; section 460 specifically defines first degree burglary as "[e]very burglary of an inhabited dwelling house...." We find nothing in this language which would exempt appellant from conviction for burglary simply because his entry into the Hemphills' house took place from the garage rather than from somewhere outdoors.
Viewed from this perspective, we do not agree with appellant that the cases relied upon by the People are distinguishable from the instant case. If the unauthorized entry of a room with the intention to commit a felony is a burglary (People v. Deptula, supra, 58 Cal.2d at p. 228; People v. Mackabee, supra, 214 Cal. App.3d at pp. 1254-1255; People v. Edwards, supra, 22 Cal. App.3d at p. 602; People v. Gaytan, supra, 38 Cal. App.2d at p. 87), we do not perceive how appellant's unconsented, forcible breaking into the *906 living quarters of the house with intent to steal could likewise be anything other than first degree burglary.[2]
More importantly, appellant's position would undermine the policy and purpose underlying the concept of burglary. (3) "`Burglary laws are based primarily upon a recognition of the dangers to personal safety created by the usual burglary situation  the danger that the intruder will harm the occupants in attempting to perpetrate the intended crime or to escape and the danger that the occupants will in anger or panic react violently to the invasion, thereby inviting more violence. The laws are primarily designed, then, not to deter the trespass and the intended crime, which are prohibited by other laws, so much as to forestall the germination of a situation dangerous to personal safety.' Section 459, in short, is aimed at the danger caused by the unauthorized entry itself." (People v. Gauze (1975) 15 Cal.3d 709, 715 [25 Cal. Rptr. 773, 542 P.2d 1365], quoting from People v. Lewis (1969) 274 Cal. App.2d 912, 920 [79 Cal. Rptr. 650].)
Thus, the underlying purpose of the law's differentiation of the crime of burglary from that of larceny is to protect citizens in their homes and dwellings. It is the level of danger to personal safety that makes burglary a significantly more serious crime than larceny. Indeed, it is precisely because the entry of an inhabited dwelling is considered more dangerous than the entry of some other building, that it has been made the basis for defining a higher degree of the felony of burglary. (People v. Wilson, supra, 208 Cal. App.3d at p. 615.)
(1c) Here, appellant's forcible and unauthorized entry into the living quarters of the Hemphills' home was precisely the evil that the burglary statute is designed and intended to prevent. The kitchen was separate from the garage. It was protected and secured by a locked door which appellant forced open with a crowbar. The Hemphills' expectation of privacy and security within their living quarters was clearly greater than that in their garage, even if the garage may be considered part of the entire dwelling for burglary purposes. In our opinion, it would defeat the purposes of the burglary statute to hold in this case that appellant could not be found guilty *907 of burglary unless it was shown that he conceived his felonious intent prior to entering the garage, as opposed to breaking into the house itself.
Thus, the prosecutor's argument to the jury, that appellant was guilty of burglary if he had formed the intent to steal at the time he forced open the door from the garage to the kitchen, was not an erroneous statement of the law.
(4) No error resulted from the fact that the trial court's instructions to the jury defined burglary as the entry of a "residence" with the specific intent to steal. The trial court's jury instruction was not erroneous. The terms "residence" and "inhabited dwelling house" have been construed to be equivalent. (People v. Harrell (1989) 207 Cal. App.3d 1439, 1445 [255 Cal. Rptr. 750]; People v. Deay (1987) 194 Cal. App.3d 280, 284 [239 Cal. Rptr. 406].) There is no question but that the jury understood that it was to determine whether appellant formed the specific intent to steal at the time he decided to break into the kitchen and not when he was contemplating entry into the garage. The prosecutor's argument to the jury made it abundantly clear that the People were trying the case on the theory that it was appellant's forcible entry of the kitchen door that constituted burglary, not his previous entry of the garage. (People v. Carrera (1989) 49 Cal.3d 291, 313-314 [261 Cal. Rptr. 348, 777 P.2d 121]; People v. Mackabee, supra, 214 Cal. App.3d at pp. 1254-1255.) Furthermore, on more than one occasion during closing argument, defense counsel acknowledged that this was the theory upon which the prosecution was proceeding. There was no error.

III[*]
.... .... .... .... .... .... .... .

IV
(5) Appellant's final contention on appeal is that the trial court imposed a prison sentence unauthorized by law. In sentencing appellant on count II, assault with a firearm upon a peace officer, the court imposed an upper term of 10 years in prison, but stayed that term pursuant to section 654. The People concede that the proper upper term punishment for the relevant offense (§ 245, subd. (c)) is eight years. Consequently, as to count II, the judgment should be modified to reduce the upper term sentence from 10 years to 8 years.


*908 V
As to count II, assault with a firearm upon a peace officer, the judgment is modified to reduce the upper term sentence from 10 years to 8 years. In all other respects, the judgment is affirmed.
White, P.J., and Strankman, J.,[**] concurred.
Appellant's petition for review by the Supreme Court was denied January 16, 1992.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part III.
[1]  Subsequent statutory references are to the Penal Code unless otherwise indicated.
[2]  The fact that in some of these cases the rooms entered into were separate dwelling units within a larger structure is not controlling. We agree with the People that whether or not a burglar knows that a room in a house is a separate dwelling of a boarder is usually fortuitous, and not determinative of whether a burglary has occurred. On the other hand, where a burglar enters several rooms in a single structure, each with felonious intent, and steals something from each, ordinarily he or she cannot be charged with multiple burglaries and punished separately for each room burgled unless each room constituted a separate, individual dwelling place within the meaning of sections 459 and 460. That is not the case here; appellant was not charged with multiple burglaries, and the People do not contend that he could have been.
[*]   See footnote, ante, page 899.
[**]   Presiding Justice of the Court of Appeal, First District, Division One, sitting under assignment by the Chairperson of the Judicial Council.
