Modified win_error method to use FORMAT_MESSAGE_MAX_WIDTH_MASK.
Added more changes for 0.3.1.