From 6327e241910019ec960b8b3bb74719b9197c6c89 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Wed, 18 Jul 2018 03:40:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Fixing=20build=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 ++- build.sh | 2 +- src/fileReader.c | 2 +- src/fileReader.h | 2 +- src/main.c | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) 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)