Просмотр исходного кода

* ftparchive/apt-ftparchive.cc:
- fix endless loop for multiple TranslationsWriters

Michael Vogt лет назад: 15
Родитель
Сommit
38b251951f
2 измененных файлов с 5 добавлено и 1 удалено
  1. 4 0
      debian/changelog
  2. 1 1
      ftparchive/apt-ftparchive.cc

+ 4 - 0
debian/changelog

@@ -11,6 +11,10 @@ apt (0.8.10) unstable; urgency=low
       will actually test uncompressed indexes regardless of the internal
       will actually test uncompressed indexes regardless of the internal
       default value of Acquire::GzipIndexes.
       default value of Acquire::GzipIndexes.
 
 
+  [ David Kalnischkies ]
+  * ftparchive/apt-ftparchive.cc:
+    - fix endless loop for multiple TranslationsWriters
+
  -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 22 Nov 2010 10:40:45 +0100
  -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 22 Nov 2010 10:40:45 +0100
 
 
 apt (0.8.9) unstable; urgency=low
 apt (0.8.9) unstable; urgency=low

+ 1 - 1
ftparchive/apt-ftparchive.cc

@@ -832,7 +832,7 @@ bool Generate(CommandLine &CmdL)
    }
    }
 
 
    // close the Translation master files
    // close the Translation master files
-   for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
+   for (vector<PackageMap>::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); I++)
       if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0)
       if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0)
 	 delete I->TransWriter;
 	 delete I->TransWriter;