diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/env/env.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/env/env.c b/lib/env/env.c index 7ceaa15..669527e 100644 --- a/lib/env/env.c +++ b/lib/env/env.c @@ -25,6 +25,7 @@ const char *getenv(const char *key) return ++value; } +#include "../io/io.h" void setenv(const char *key, const char *value) { @@ -53,7 +54,7 @@ void setenv(const char *key, const char *value) } } - *p = malloc((cstr_length(key) + cstr_length(key)) + 2); + *p = malloc((cstr_length(key) + cstr_length(value)) + 2); char *i = *p; while (*key) *(i++) = *(key++); |