From 694ab455cd3c9dbe17e0e3be9ba80ad7c4443dc1 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Tue, 12 Feb 2013 13:50:43 +0100 Subject: [PATCH] Fixed broken export_func Fix for https://github.com/fish-shell/fish-shell/issues/573 --- env.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/env.cpp b/env.cpp index 503d73143..118eeb01a 100644 --- a/env.cpp +++ b/env.cpp @@ -1422,14 +1422,14 @@ static void export_func(const std::map &envs, std::vector::const_iterator iter; for (iter = envs.begin(); iter != envs.end(); ++iter) { - std::string ks = wcs2string(iter->first); - const std::string vs = wcs2string(iter->second); + const std::string ks = wcs2string(iter->first); + std::string vs = wcs2string(iter->second); - for (size_t i=0; i < ks.size(); i++) + for (size_t i=0; i < vs.size(); i++) { - char &kc = ks.at(i); - if (kc == ARRAY_SEP) - kc = ':'; + char &vc = vs.at(i); + if (vc == ARRAY_SEP) + vc = ':'; } /* Put a string on the vector */