I've been porting a Linux/Mac command-line application to Windows XP using Dev-C++. It's all working other than one particular part where command line arguments are copied to strings. The command line options are processed by argtable in the same way as the first piece of example code. Here's the struct that concerns a "key file" which the users must supply.
The code pops up a box asking if I'd like to report it's crash to Microsoft when it reaches this part:
struct arg_file *key = arg_file0("k",NULL,"<key>", "key file (<username>_pass.pem)");
N.B. I have already defined a "char keyfile" and the keyfile's name is shorter than that. Strangely, the following line prints out the key file name exactly as expected:
Also if I replace the key->filename with a quoted file name in the strcpy above then the rest of the code runs as it should. Can anyone suggest what the problem might be?