wok-current diff qemu/stuff/cloop.u @ rev 17864

Up: netsurf (3.3)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 25 16:55:26 2015 +0200 (2015-03-25)
parents 1f00b27b3afb
children 9c8ef3fd3dcf
line diff
     1.1 --- a/qemu/stuff/cloop.u	Thu Oct 23 11:06:43 2014 +0200
     1.2 +++ b/qemu/stuff/cloop.u	Wed Mar 25 16:55:26 2015 +0200
     1.3 @@ -30,7 +30,7 @@
     1.4  +			// return (char *) "128BE accelerated knoppix 1.0";
     1.5  +		}
     1.6  +		else { /* V2.0 */
     1.7 -+			uint64_t last = be64_to_cpu(ofs64[n]);
     1.8 ++			uint64_t last = be64_to_cpu(ofs64[n - 1]);
     1.9  +			while (n--) {
    1.10  +				offsets[n].size = last - 
    1.11  +					(offsets[n].offset = be64_to_cpu(ofs64[n])); 
    1.12 @@ -40,7 +40,7 @@
    1.13  +		}
    1.14  +	}
    1.15  +	else if (ofs32[1] == 0) { /* V1.0 */
    1.16 -+		uint64_t last = le64_to_cpu(ofs64[n]);
    1.17 ++		uint64_t last = le64_to_cpu(ofs64[n - 1]);
    1.18  +		while (n--) {
    1.19  +			offsets[n].size = last - 
    1.20  +				(offsets[n].offset = le64_to_cpu(ofs64[n])); 
    1.21 @@ -49,7 +49,7 @@
    1.22  +		// return (char *) "64LE v1.0";
    1.23  +	}
    1.24  +	else if (ntohl(ofs32[0]) == (4*n) + 0x8C) { /* V0.68 */
    1.25 -+		uint64_t last = ntohl(ofs32[n]);
    1.26 ++		uint64_t last = ntohl(ofs32[n - 1]);
    1.27  +		while (n--) {
    1.28  +			offsets[n].size = last - 
    1.29  +				(offsets[n].offset = ntohl(ofs32[n]));