Commit f6817dab authored by Florian Oetke's avatar Florian Oetke
Browse files

added missing return value/error code check

parent ab80b6a8
......@@ -142,7 +142,9 @@ namespace mirrage::asset {
#ifdef WINDOWS
_getcwd(cCurrentPath, sizeof(cCurrentPath));
#else
getcwd(cCurrentPath, sizeof(cCurrentPath));
if(getcwd(cCurrentPath, sizeof(cCurrentPath)) == nullptr) {
MIRRAGE_FAIL("getcwd with max length " << FILENAME_MAX << " failed with error code " << errno);
}
#endif
return cCurrentPath;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment