src/file_par2.c: fix compilation warning
This commit is contained in:
parent
dc0f90ba71
commit
9727615b01
1 changed files with 2 additions and 1 deletions
|
@ -75,6 +75,7 @@ static void file_rename_par2(const char *old_filename)
|
|||
uint64_t length;
|
||||
int buffer_size;
|
||||
unsigned char buffer[4096];
|
||||
const uint64_t *lengthp=(const uint64_t *)&buffer[8];
|
||||
if(fseek(file, offset, SEEK_SET)<0)
|
||||
{
|
||||
fclose(file);
|
||||
|
@ -86,7 +87,7 @@ static void file_rename_par2(const char *old_filename)
|
|||
fclose(file);
|
||||
return;
|
||||
}
|
||||
length=le64((*(const uint64_t *)(&buffer[8])));
|
||||
length=le64(*lengthp);
|
||||
if(length % 4 !=0 || length < 16 ||
|
||||
memcmp(&buffer, &par2_header, sizeof(par2_header))!=0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue