indentation of this function got messed up.

Make sure your VS is set to 2-space real tabs, then:

select, Ctrl-K, Ctrl-F 

is the easy way to fix it.