MAX_PATH includes terminating NUL already @cremno says, so remove +1.