Fix memory computation error for MEMDISK
authorhpa <hpa>
Wed, 16 Apr 2003 04:17:39 +0000 (04:17 +0000)
committerhpa <hpa>
Wed, 16 Apr 2003 04:17:39 +0000 (04:17 +0000)
NEWS
memdisk/setup.c

diff --git a/NEWS b/NEWS
index 6067bcc..ff57712 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ Changes in 2.04:
        * SYSLINUX: Resurrect the old no-mtools version of the
          installer, although as a root-only tool.  Some distributors
          have indicated that they need a small standalone installer.
+       * MEMDISK: Fix a memory offset computation error when
+         installing compressed disks which generally would cause
+         1 MB of memory to be wasted.
 
 Changes in 2.03:
        * Actually support comment lines in the configuration file.
index e9303ec..524f3a4 100644 (file)
@@ -1,7 +1,7 @@
 #ident "$Id$"
 /* ----------------------------------------------------------------------- *
  *   
- *   Copyright 2001-2002 H. Peter Anvin - All Rights Reserved
+ *   Copyright 2001-2003 H. Peter Anvin - All Rights Reserved
  *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
@@ -247,7 +247,7 @@ void unzip_if_needed(uint32_t *where_p, uint32_t *size_p)
       if ( startrange <= (-gzdatasize) &&
           ranges[i].type == 1 &&
           endrange - startrange >= gzdatasize ) {
-       end_mem = endrange - ranges[i].start;
+       end_mem = (uint32_t)endrange;
        okmem = 1;
       }
     }