diff options
Diffstat (limited to 'src/stdlib/getenv.c')
| -rw-r--r-- | src/stdlib/getenv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/getenv.c b/src/stdlib/getenv.c index 4ba83edb..8cb99463 100644 --- a/src/stdlib/getenv.c +++ b/src/stdlib/getenv.c @@ -12,11 +12,11 @@ char * getenv(const char * name) for (i = 0; environ[i] != NULL; i++) { if (!strncmp(environ[i], name, len) && environ[i][len] == '=') { - break; + return environ[i] + len + 1; } } - return environ[i]; + return NULL; } /*** |
