diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-06-16 19:55:43 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-06-16 19:55:43 +0200 |
commit | 2b803d4069e1f05d0461fbad004482ff02100812 (patch) | |
tree | b30b90c27dd363de7e8fd83432ed7a54eefada0f /apt-pkg/edsp | |
parent | ef5dc12ccb6964a52c7c7674d2eff98435089d92 (diff) |
do not dereference the storage for the unique strings as the pointer can
change at the time of writing the strings, so first store it temporary
and then save the index in the (possibily new) pointer location
Diffstat (limited to 'apt-pkg/edsp')
-rw-r--r-- | apt-pkg/edsp/edspindexfile.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index 482581979..98ce4497a 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -51,7 +51,8 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const pkgCache::PkgFileIterator CFile = Gen.GetCurFile(); CFile->Size = Pkg.FileSize(); CFile->mtime = Pkg.ModificationTime(); - CFile->Archive = Gen.WriteUniqString("edsp::scenario"); + map_ptrloc const storage = Gen.WriteUniqString("edsp::scenario"); + CFile->Archive = storage; if (Gen.MergeList(Parser) == false) return _error->Error("Problem with MergeList %s",File.c_str()); |