diff --git a/.vscode/settings.json b/.vscode/settings.json index fecddce..a2e83cb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "files.associations": { - "filereader.h": "c" + "filereader.h": "c", + "decrypt.h": "c" } } \ No newline at end of file diff --git a/build.sh b/build.sh index ab6bd7c..3ea1d02 100644 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -gcc -m64 -o patcher-installer src/main.c && chmod +x patcher-installer +gcc -m64 -o patcher-installer lib/miniz/*.c src/*.c && chmod +x patcher-installer diff --git a/src/fileReader.c b/src/fileReader.c index c326f59..e6948ce 100644 --- a/src/fileReader.c +++ b/src/fileReader.c @@ -7,7 +7,7 @@ #include "fileReader.h" -void initFileReader(unsigned char path[], unsigned long offset, unsigned long length) { +void initFileReader(char path[], unsigned long offset, unsigned long length) { //Opens the given file at the given address //Returns a function that will read into memory and return that memory. diff --git a/src/fileReader.h b/src/fileReader.h index ddf827e..687cab1 100644 --- a/src/fileReader.h +++ b/src/fileReader.h @@ -1,5 +1,5 @@ #pragma once -void initFileReader(unsigned char path[], unsigned long offset, unsigned long length); +void initFileReader(char path[], unsigned long offset, unsigned long length); unsigned char* readBytes(unsigned long numBytes); diff --git a/src/main.c b/src/main.c index 31a3b4c..edde11a 100644 --- a/src/main.c +++ b/src/main.c @@ -13,10 +13,10 @@ int main(int argc, unsigned char *argv[]) { printf("Hello World!\n"); //Initialise file reader - initFileReader("1234", 0, 10); + initFileReader("1234", 0UL, 10UL); //Skip header (30 bytes + additional length) - readBytes(30); + readBytes(30UL); //Initialise decryption (pass decryption keys)