diff --git a/src/ld65/objfile.c b/src/ld65/objfile.c index af7f18bff..6f38a038f 100644 --- a/src/ld65/objfile.c +++ b/src/ld65/objfile.c @@ -38,8 +38,10 @@ #include #include -#include "../common/xmalloc.h" - +/* common */ +#include "xmalloc.h" + +/* ld65 */ #include "dbgsyms.h" #include "error.h" #include "exports.h" @@ -105,7 +107,7 @@ void ObjReadFiles (FILE* F, ObjData* O) { unsigned I; - O->FileCount = Read8 (F); + O->FileCount = Read16 (F); O->Files = xmalloc (O->FileCount * sizeof (char*)); for (I = 0; I < O->FileCount; ++I) { /* Skip MTime and size */ diff --git a/src/od65/dump.c b/src/od65/dump.c index 67708e8e7..106f5c8a8 100644 --- a/src/od65/dump.c +++ b/src/od65/dump.c @@ -361,7 +361,7 @@ void DumpObjFiles (FILE* F, unsigned long Offset) printf (" Files:\n"); /* Read the number of files and print it */ - Count = Read8 (F); + Count = Read16 (F); printf (" Count:%27u\n", Count); /* Read and print all files */