I am getting this error in visual studio: Debug Assertion Failed! Expression: (L"Buffer is too small" && 0)
It happens at the following lines of code:
program_name = (char *) malloc(strlen(argv[0])+1);
strcpy_s(program_name,sizeof(program_name),argv[0]);
It appears the size of the buffer it is trying to copy the character array to is too small but I am not sure why?