ref: 18294dc5c1870948cf8a7375e3084b02eeab9dbd
parent: ee35eec9bac04ce55e5fe1ae1eeb5428b47d91a8
author: Jacob Moody <moody@posixcafe.org>
date: Fri Feb 10 21:00:25 EST 2023
bizare getwd use
--- a/src/rt_menu.c
+++ b/src/rt_menu.c
@@ -1530,6 +1530,8 @@
memset (&SaveGamesAvail[0], 0, sizeof (SaveGamesAvail));
#if PLATFORM_WIN32
GetPathFromEnvironment( filename, ApogeePath, SaveName );
+#elif defined(__plan9__)
+ strncpy(filename, SaveName, 256);
#else
strncpy (filename, SaveName, 256);
pathsave = getcwd (NULL, 0);
@@ -1558,7 +1560,7 @@
}
else
MainMenu[loadgame].active = CP_Inactive;
-#if !PLATFORM_WIN32
+#if !PLATFORM_WIN32 && !defined(__plan9__)
chdir (pathsave);
free (pathsave);
#endif