My question involves search and seizure law in the State of: Tennessee

I am in the house and my roommate leaves for school and she is approached near her car by police and asked her if I'm in the apartment. They make her open the downstairs door which allows access into the building. They take the keys from her and proceed upstairs to enter the apartment w/ the wrong key at 1st. I hear keys fumbling at the door and I approach the door and look through the peep hole. I stand in the living room as they enter and they yell for me to get on the floor. They explain that they have a warrant for my arrest. Afterward they proceed to go into the bedroom and they found some marijuana about 10 ft away from me in the next room. They used that as probable cause to get a warrant and search the apt after i was taken to jail. The arrest warrant was an indictment for sale of drugs . Do they have the right to search a room that i was not apprehended in? Also what would make the warrant invalid..Should it have details on what their looking for?