From af80895e50ddacbbe68b47650f29d0f8edbc82d7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 1 Aug 2020 16:01:29 +0200 Subject: Switched to main --- src/features/load.c | 3 ++- src/inc/load.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/features/load.c b/src/features/load.c index 37ed6ad..47beb9b 100644 --- a/src/features/load.c +++ b/src/features/load.c @@ -1,5 +1,6 @@ #include #include +#include #include void bin_load(char *path) @@ -7,7 +8,7 @@ void bin_load(char *path) char *data = read_file(path); void (*entry)(); - *(void **)(&entry) = data + 0xfe; + *(void **)(&entry) = data + MAIN_OFFSET; entry(); } diff --git a/src/inc/load.h b/src/inc/load.h index afca249..8ba026b 100644 --- a/src/inc/load.h +++ b/src/inc/load.h @@ -3,7 +3,7 @@ #ifndef LOAD_H #define LOAD_H -#include +#define MAIN_OFFSET 0xfe void bin_load(char *path); -- cgit v1.2.3