Fix unsigned typos
This commit is contained in:
parent
8ca61905e1
commit
c06790d5e0
2 changed files with 8 additions and 7 deletions
|
|
@ -25,8 +25,8 @@ typedef struct LFH
|
||||||
int crc32;
|
int crc32;
|
||||||
int compressed_size;
|
int compressed_size;
|
||||||
int uncompressed_size;
|
int uncompressed_size;
|
||||||
short filename_length;
|
unsigned short filename_length;
|
||||||
short extraf_length;
|
unsigned short extraf_length;
|
||||||
} LFH;
|
} LFH;
|
||||||
|
|
||||||
typedef struct CDH
|
typedef struct CDH
|
||||||
|
|
@ -41,9 +41,9 @@ typedef struct CDH
|
||||||
int crc32;
|
int crc32;
|
||||||
int compressed_size;
|
int compressed_size;
|
||||||
int uncompressed_size;
|
int uncompressed_size;
|
||||||
short filename_length;
|
unsigned short filename_length;
|
||||||
short extraf_length;
|
unsigned short extraf_length;
|
||||||
short file_comment_length;
|
unsigned short file_comment_length;
|
||||||
short disk_number_start;
|
short disk_number_start;
|
||||||
short internal_file_attributes;
|
short internal_file_attributes;
|
||||||
int external_file_attributes;
|
int external_file_attributes;
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,9 @@ void get_cdh(zip* z)
|
||||||
z->lfh_off[i] = cdh->off_lfh;
|
z->lfh_off[i] = cdh->off_lfh;
|
||||||
z->cdh_filename_length[i] = cdh->filename_length;
|
z->cdh_filename_length[i] = cdh->filename_length;
|
||||||
|
|
||||||
cdh = (CDH*) (((char*) cdh) + sizeof(CDH) + cdh->filename_length +
|
unsigned short len = cdh->filename_length + cdh->extraf_length +
|
||||||
cdh->extraf_length + cdh->file_comment_length);
|
cdh->file_comment_length;
|
||||||
|
cdh = (CDH*) (((char*) cdh) + sizeof(CDH) + len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue