San Francisco went up early 3-0 when, after several big offensive plays, Buffalo stuffed Frank Gore on two straight runs from the one-yard line. The Bills then tied the game up when, after a lengthy drive, Ryan Fitzpatrick threw behind Donald Jones, stalling the possession. The 49ers then went up 10-3 and were on the verge of padding that lead when Marcell Dareus recovered a Colin Kaepernick fumble, ending the scoring threat.
Of course, three plays later, Scott Chandler fumbled, Dashon Goldson recovered on the 28-yard line, and the 49ers scored on an Alex Smith to Michael Crabtree touchdown to take their 17-3 lead.
Leodis McKelvin had a punt return touchdown called back on a holding play. San Francisco already has 320 yards of offense, and they'd have accumulated much more had they not hamstrung themselves with the aforementioned turnover and five penalties.
So, in short, you're watching a Bills game. You have another half to get through. Buckle up.