dethrace-labs / dethrace

Reverse engineering the 1997 game "Carmageddon"
https://twitter.com/dethrace_labs
GNU General Public License v3.0
667 stars 38 forks source link

Fix windows chdir behavior #365

Closed dethrace-labs closed 2 months ago

dethrace-labs commented 2 months ago

argv[0] was expected to include the full path to the dethrace executable. On windows, this is not true, and only includes the filename.

As a fix, we should only try to chdir if root_dir is not empty or a single character.

dethrace-labs commented 2 months ago

thanks for the spotting! I must be tired today :)