mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-08 07:48:47 +00:00
fixes + dependency test
This commit is contained in:
parent
19c99bc7e5
commit
72ec1923e3
7 changed files with 46 additions and 17 deletions
|
|
@ -52,7 +52,15 @@ Bytefile *read_file(const char *fname) {
|
|||
}
|
||||
|
||||
long size = ftell(f);
|
||||
long additional_size = sizeof(void *) * 5 + sizeof(int);
|
||||
|
||||
// [uint] stringtab_size
|
||||
// [uint] global_area_size
|
||||
// [uint] imports_number
|
||||
// [uint] public_symbols_number
|
||||
// char[0] buffer
|
||||
long file_header_size = 4 * sizeof(uint) + sizeof(char[0]);
|
||||
|
||||
long additional_size = sizeof(Bytefile) - file_header_size;
|
||||
file = (Bytefile *)malloc(size +
|
||||
additional_size); // file itself + additional data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue