Fix possible buffer overflow in GetLastError

I thought VC was meant to catch this kind of obvious error?