🚚 Fix build error
This commit is contained in:
parent
736e92ebd5
commit
12190f0ae8
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void initFileReader(char path[], unsigned long offset);
|
||||
|
|
|
@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
|
|||
initFileReader(state.diskName, state.diskOffset);
|
||||
|
||||
//Skip local file header (30 bytes + additional length)
|
||||
getBytes(compressedChunk, 30UL);
|
||||
getBytes(compressedChunk, 30UL, false);
|
||||
//Check that header is correct
|
||||
const uint32_t magic = getUint32(compressedChunk);
|
||||
if (magic != LOCAL_FILE_HEADER_MAGIC) {
|
||||
|
@ -67,12 +67,12 @@ int main(int argc, char *argv[]) {
|
|||
//Read additional length
|
||||
const unsigned long additionalLength = getUint16(compressedChunk + 26) + getUint16(compressedChunk + 28);
|
||||
if (additionalLength > 0UL) {
|
||||
getBytes(NULL, additionalLength);
|
||||
getBytes(NULL, additionalLength, false);
|
||||
}
|
||||
|
||||
//If file is encrypted, skip 12-byte encryption header
|
||||
if (state.isEncrypted) {
|
||||
getBytes(compressedChunk, ENCRYPTION_HEADER_LENGTH);
|
||||
getBytes(compressedChunk, ENCRYPTION_HEADER_LENGTH, false);
|
||||
decrypt(compressedChunk, ENCRYPTION_HEADER_LENGTH);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue