San Francisco had lost six straight games overall before Wednesday's win, which matched a season-high.