aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-15 05:50:55 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-15 05:50:55 +0000
commit63fd3b0e5a7596b7af6edf4b0c5db0ae98bc2153 (patch)
tree42a6c6bb01e1fa78fe90efed32039879260ac9a3
parent5a2e1890226bfa015f2825ddfb81d23cc2d6bd88 (diff)
downloadioquake3-aero-63fd3b0e5a7596b7af6edf4b0c5db0ae98bc2153.tar.gz
ioquake3-aero-63fd3b0e5a7596b7af6edf4b0c5db0ae98bc2153.zip
Fixed compiler warning (glibc complains if you don't check getcwd() retval).
git-svn-id: svn://svn.icculus.org/quake3/trunk@1618 edf5b092-35ff-0310-97b2-ce42778d08ea
-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