Good answers so far, bottom line is depends of the severity of the damage and the type of loan you are using. Your loan won't be rejected it will just be a condition that has to be fixed if its called out by the appraiser. Both your lender and realtor should be able to give you a best case/ worse case senario. Besides even if its called out request the repair from the seller. I am seeing banks do the repairs if its a health and safety issue. Good Luck!
Hope all goes well with your purchase!
Apple Valley Realtors