aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar Jan Kanis <jan.code@jankanis.nl>2012-12-29 19:25:00 +0100
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-02 23:31:30 -0800
commit9ee7b0a5010eaf406ad3f9277b29e8fd06c3d628 (patch)
tree38f1055713fe238b242f96e3073e83d65660a922 /env.cpp
parent3c116f6ab3105b321c8b2e659d8fc63e315bc423 (diff)
really fix bug in export status of universal vars; add tests for that bug
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/env.cpp b/env.cpp
index 370a636a..4787827e 100644
--- a/env.cpp
+++ b/env.cpp
@@ -811,7 +811,7 @@ int env_set(const wcstring &key, const wchar_t *val, int var_mode)
if (var_mode & ENV_UNIVERSAL)
{
- int exportv = 0;
+ int exportv;
if (!(var_mode & ENV_EXPORT) &&
!(var_mode & ENV_UNEXPORT))
@@ -868,12 +868,12 @@ int env_set(const wcstring &key, const wchar_t *val, int var_mode)
if (env_universal_get(key))
{
- int exportv = 0;
+ int exportv;
if (!(var_mode & ENV_EXPORT) &&
!(var_mode & ENV_UNEXPORT))
{
- env_universal_get_export(key);
+ exportv = env_universal_get_export(key);
}
else
{