env: restore old env_get_char() behaviour