diff options
-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; |