summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-25 15:42:33 +1100
committerquou <quou@disroot.org>2024-12-25 15:42:33 +1100
commit5c4b69d297fb6ece6e41704318a7e6917a724811 (patch)
tree051ea5cb945dbc8d1300e23b1cc90f63fe540db3
parent078b97e48b5ad5fcf3f5a16bb081ea0efb1f931b (diff)
fix the file packer
-rw-r--r--packer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packer.c b/packer.c
index ca1cb4a..79acd2e 100644
--- a/packer.c
+++ b/packer.c
@@ -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;