NeighTools / UnityDoorstop

Doorstop -- run C# before Unity does!
GNU Lesser General Public License v2.1
419 stars 62 forks source link

Fixed broken path for output_log #50

Closed diehy closed 2 months ago

diehy commented 5 months ago

Being given the option for Doorstop to automatically redirect the output log is neat, and it saves me from running additional code to patch mainData for the redirect.

However, the path used for it is clearly incorrect, and I've noticed that it isn't just an issue for me: #39

After having a quick peek it appears that the wrong path variable is being used for the absolute directory path, resulting in it being trimmed early due to the filename length being short.

size_t app_dir_len = strlen(paths->doorstop_filename); // A simple goof!

A quick change resolves this issue:

size_t app_dir_len = strlen(paths->app_dir); // Yay it works!