Vinegar does not prevent rice from spoiling, but it can help to remove any unwanted odors or flavors.