mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Robert Weaver's fix
This commit is contained in:
parent
25bad589ba
commit
b3dbdfa306
@ -41,12 +41,13 @@ char *GetEnv(char *variable)
|
||||
char env[MAX_PATH]; /* MAX_PATH is from windef.h */
|
||||
char *temp = getenv(variable);
|
||||
env[0] = '\0';
|
||||
ExpandEnvironmentStrings(temp, env, sizeof(env));
|
||||
if (temp != NULL)
|
||||
ExpandEnvironmentStrings(temp, env, sizeof(env));
|
||||
#else
|
||||
/* no length control */
|
||||
char *env = getenv(variable);
|
||||
#endif
|
||||
return env?strdup(env):NULL;
|
||||
return (env && env[0])?strdup(env):NULL;
|
||||
}
|
||||
|
||||
char *curl_getenv(char *v)
|
||||
|
Loading…
Reference in New Issue
Block a user