From 5c4b69d297fb6ece6e41704318a7e6917a724811 Mon Sep 17 00:00:00 2001 From: quou Date: Wed, 25 Dec 2024 15:42:33 +1100 Subject: fix the file packer --- packer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packer.c') 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; -- cgit v1.2.3-54-g00ecf