summaryrefslogtreecommitdiff
path: root/src/sys/sys_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/sys_unix.c')
-rw-r--r--src/sys/sys_unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c
index 760b6022..b55bbe6d 100644
--- a/src/sys/sys_unix.c
+++ b/src/sys/sys_unix.c
@@ -231,7 +231,10 @@ char *Sys_Cwd( void )
{
static char cwd[MAX_OSPATH];
- getcwd( cwd, sizeof( cwd ) - 1 );
+ char *result = getcwd( cwd, sizeof( cwd ) - 1 );
+ if( result != cwd )
+ return NULL;
+
cwd[MAX_OSPATH-1] = 0;
return cwd;