From 79fadbf2716730d43b2e182d0eed69329df0682e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 15 Sep 2009 05:50:55 +0000 Subject: [PATCH] Fixed compiler warning (glibc complains if you don't check getcwd() retval). --- code/tools/asm/cmdlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/tools/asm/cmdlib.c b/code/tools/asm/cmdlib.c index 9b579f2b..f7171eea 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