Correctly calculate swprintf max string size instead of buffer size