... Release_2.1.0-RC7
authorVolker Birk <vb@pep-project.org>
Sat, 04 Jul 2020 23:46:14 +0200
changeset 27221f83662613f
parent 271 232f492db882
child 273 5ad339a9db87
...
passphrase_cache.cc
     1.1 --- a/passphrase_cache.cc	Sat Jul 04 23:43:17 2020 +0200
     1.2 +++ b/passphrase_cache.cc	Sat Jul 04 23:46:14 2020 +0200
     1.3 @@ -14,7 +14,8 @@
     1.4  
     1.5      PassphraseCache::PassphraseCache(const PassphraseCache& second) :
     1.6              _cache{second._cache}, _max_size{second._max_size},
     1.7 -            _timeout{second._timeout}, first_time(true)
     1.8 +            _timeout{second._timeout}, _stored{second._stored},
     1.9 +            first_time(true)
    1.10      {
    1.11          cleanup();
    1.12      }
    1.13 @@ -98,7 +99,8 @@
    1.14              cleanup();
    1.15              _which = _cache.end();
    1.16              first_time = false;
    1.17 -            return _stored.c_str();
    1.18 +            if (!_stored.empty())
    1.19 +                return _stored.c_str();
    1.20          }
    1.21  
    1.22          if (_cache.empty()) {