Don't ignore return value from getcwd()

This commit is contained in:
Matt Pharr
2011-12-05 09:26:33 -08:00
parent d748c501c9
commit 455d963962
2 changed files with 4 additions and 2 deletions

View File

@@ -353,7 +353,8 @@ Globals::Globals() {
#ifdef ISPC_IS_WINDOWS
_getcwd(currentDirectory, sizeof(currentDirectory));
#else
getcwd(currentDirectory, sizeof(currentDirectory));
if (getcwd(currentDirectory, sizeof(currentDirectory)) == NULL)
FATAL("Current directory path too long!");
#endif
}