diff options
author | quou <quou@disroot.org> | 2024-12-25 15:42:33 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-25 15:42:33 +1100 |
commit | 5c4b69d297fb6ece6e41704318a7e6917a724811 (patch) | |
tree | 051ea5cb945dbc8d1300e23b1cc90f63fe540db3 | |
parent | 078b97e48b5ad5fcf3f5a16bb081ea0efb1f931b (diff) |
fix the file packer
-rw-r--r-- | packer.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -56,10 +56,14 @@ int main(int argc, const char** argv) { fwrite(table, 1, table_size, outfile); coff = ftell(outfile); for (i = 0; i < file_count; i++) { + char fname[1024] = { 0 }; FILE* infile; Pack_Entry* e = &table[i]; uint32_t j; - infile = fopen(argv[i + 3], "rb"); + strcat(fname, workingdir); + strcat(fname, dsep); + strcat(fname, e->name); + infile = fopen(fname, "rb"); if (!infile) { print_err("Failed to open %s.\n", argv[i + 3]); return 6; |