aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--code/tools/asm/cmdlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/code/tools/asm/cmdlib.c b/code/tools/asm/cmdlib.c
index 9b579f2..f7171ee 100644
--- a/code/tools/asm/cmdlib.c
+++ b/code/tools/asm/cmdlib.c
@@ -396,10 +396,12 @@ void Q_getwd (char *out)
int i = 0;
#ifdef WIN32
- _getcwd (out, 256);
+ if (_getcwd (out, 256) == NULL)
+ strcpy(out, "."); /* shrug */
strcat (out, "\\");
#else
- getcwd (out, 256);
+ if (getcwd (out, 256) == NULL)
+ strcpy(out, "."); /* shrug */
strcat (out, "/");
#endif