setup.exe won't install last package patch

Jason Tishler jason@tishler.net
Wed Feb 6 10:03:00 GMT 2002


The attached patch fixes an off-by-one error that prevents the last
package (i.e., zlib) from being installed by the latest setup.exe
(in CVS).

Jason
-------------- next part --------------
Index: download.cc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/download.cc,v
retrieving revision 2.19
diff -u -p -r2.19 download.cc
--- download.cc	2001/12/23 12:13:28	2.19
+++ download.cc	2002/02/05 19:16:05
@@ -160,7 +160,7 @@ do_download_thread (HINSTANCE h, HWND ow
 
   packagedb db;
   /* calculate the amount needed */
-  for (size_t n = 1; n < db.packages.number (); n++)
+  for (size_t n = 1; n <= db.packages.number (); n++)
     {
       packagemeta & pkg = *db.packages[n];
       if (pkg.desired && (pkg.desired->srcpicked || pkg.desired->binpicked))
@@ -180,7 +180,7 @@ do_download_thread (HINSTANCE h, HWND ow
   /* and do the download. FIXME: This here we assign a new name for the cached version
    * and check that above.
    */
-  for (size_t n = 1; n < db.packages.number (); n++)
+  for (size_t n = 1; n <= db.packages.number (); n++)
     {
       packagemeta & pkg = *db.packages[n];
       if (pkg.desired && (pkg.desired->srcpicked || pkg.desired->binpicked))
-------------- next part --------------
2002-02-05  Jason Tishler  <jason@tishler.net>

	* download.cc (do_download_thread): Fix off-by-one error.


More information about the Cygwin-patches mailing list