From 63fd3b0e5a7596b7af6edf4b0c5db0ae98bc2153 Mon Sep 17 00:00:00 2001 From: icculus Date: Tue, 15 Sep 2009 05:50:55 +0000 Subject: 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 --- code/tools/asm/cmdlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'code') 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 -- cgit v1.2.3